From 9542742cce73250232671437e3b4b57b72e9f395 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 3 Apr 2024 05:19:59 +0000 Subject: [PATCH] CodeGen from PR 28294 in Azure/azure-rest-api-specs Merge 1d103acc2539e143e3ef679a1a2d88ef66c357a4 into 92de53a5f1e0e03c94b40475d2135d97148ed014 --- sdk/datafactory/arm-datafactory/CHANGELOG.md | 30 +++++++ sdk/datafactory/arm-datafactory/_meta.json | 6 +- sdk/datafactory/arm-datafactory/package.json | 14 +--- .../review/arm-datafactory.api.md | 27 +++--- .../src/dataFactoryManagementClient.ts | 2 +- .../arm-datafactory/src/models/index.ts | 48 ++++++----- .../arm-datafactory/src/models/mappers.ts | 82 +++++++++++-------- .../arm-datafactory/src/models/parameters.ts | 4 +- .../src/operations/credentialOperations.ts | 14 ++-- .../credentialOperations.ts | 6 +- .../arm-datafactory/test/sampleTest.ts | 43 ++++++++++ sdk/datafactory/arm-datafactory/tsconfig.json | 10 +-- 12 files changed, 186 insertions(+), 100 deletions(-) create mode 100644 sdk/datafactory/arm-datafactory/test/sampleTest.ts diff --git a/sdk/datafactory/arm-datafactory/CHANGELOG.md b/sdk/datafactory/arm-datafactory/CHANGELOG.md index 49eb3eb85d1c..f08287a79c7e 100644 --- a/sdk/datafactory/arm-datafactory/CHANGELOG.md +++ b/sdk/datafactory/arm-datafactory/CHANGELOG.md @@ -1,5 +1,35 @@ # Release History + +## 15.0.0 (2024-04-03) + +**Features** + + - Added Interface ServicePrincipalCredentialResource + - Interface ExpressionV2 has a new optional parameter operators + - Enum KnownExpressionV2Type has a new value NAry +**Breaking Changes** + + - Operation CredentialOperations.createOrUpdate has a new signature + - Interface ExpressionV2 no longer has parameter operator + - Interface ManagedIdentityCredential no longer has parameter resourceId + - Type of parameter headers of interface AzureFunctionActivity is changed from { + [propertyName: string]: string; + } to { + [propertyName: string]: any; + } + - Type of parameter value of interface CredentialListResponse is changed from ManagedIdentityCredentialResource[] to CredentialResource[] + - Type of parameter headers of interface WebActivity is changed from { + [propertyName: string]: string; + } to { + [propertyName: string]: any; + } + - Type of parameter headers of interface WebHookActivity is changed from { + [propertyName: string]: string; + } to { + [propertyName: string]: any; + } + ## 14.1.1 (Unreleased) ### Features Added diff --git a/sdk/datafactory/arm-datafactory/_meta.json b/sdk/datafactory/arm-datafactory/_meta.json index 809fce1f741b..10ecf4c9188f 100644 --- a/sdk/datafactory/arm-datafactory/_meta.json +++ b/sdk/datafactory/arm-datafactory/_meta.json @@ -1,8 +1,8 @@ { - "commit": "1a011ff0d72315ef3c530fe545c4fe82d0450201", + "commit": "b2e6c959570c6b3f2652678f023d5bb950bf51a6", "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.17 --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=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/datafactory/resource-manager/readme.md --use=@autorest/typescript@^6.0.12", "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.17" + "use": "@autorest/typescript@^6.0.12" } \ No newline at end of file diff --git a/sdk/datafactory/arm-datafactory/package.json b/sdk/datafactory/arm-datafactory/package.json index 68a0eee15d0c..7880b8f0029a 100644 --- a/sdk/datafactory/arm-datafactory/package.json +++ b/sdk/datafactory/arm-datafactory/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for DataFactoryManagementClient.", - "version": "14.1.1", + "version": "15.0.0", "engines": { "node": ">=18.0.0" }, @@ -106,13 +106,5 @@ ] }, "autoPublish": true, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/datafactory/arm-datafactory", - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-datafactory?view=azure-node-preview" - } -} + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/datafactory/arm-datafactory" +} \ No newline at end of file diff --git a/sdk/datafactory/arm-datafactory/review/arm-datafactory.api.md b/sdk/datafactory/arm-datafactory/review/arm-datafactory.api.md index 3c9d2af959f0..6f8ff4604e4a 100644 --- a/sdk/datafactory/arm-datafactory/review/arm-datafactory.api.md +++ b/sdk/datafactory/arm-datafactory/review/arm-datafactory.api.md @@ -747,7 +747,7 @@ export interface AzureFunctionActivity extends ExecutionActivity { body?: any; functionName: any; headers?: { - [propertyName: string]: string; + [propertyName: string]: any; }; method: AzureFunctionActivityMethod; type: "AzureFunctionActivity"; @@ -1621,15 +1621,15 @@ export { Credential_2 as Credential } // @public export interface CredentialListResponse { nextLink?: string; - value: ManagedIdentityCredentialResource[]; + value: CredentialResource[]; } // @public export interface CredentialOperations { - createOrUpdate(resourceGroupName: string, factoryName: string, credentialName: string, credential: ManagedIdentityCredentialResource, options?: CredentialOperationsCreateOrUpdateOptionalParams): Promise; + createOrUpdate(resourceGroupName: string, factoryName: string, credentialName: string, credential: CredentialResource, options?: CredentialOperationsCreateOrUpdateOptionalParams): Promise; delete(resourceGroupName: string, factoryName: string, credentialName: string, options?: CredentialOperationsDeleteOptionalParams): Promise; get(resourceGroupName: string, factoryName: string, credentialName: string, options?: CredentialOperationsGetOptionalParams): Promise; - listByFactory(resourceGroupName: string, factoryName: string, options?: CredentialOperationsListByFactoryOptionalParams): PagedAsyncIterableIterator; + listByFactory(resourceGroupName: string, factoryName: string, options?: CredentialOperationsListByFactoryOptionalParams): PagedAsyncIterableIterator; } // @public @@ -1638,7 +1638,7 @@ export interface CredentialOperationsCreateOrUpdateOptionalParams extends coreCl } // @public -export type CredentialOperationsCreateOrUpdateResponse = ManagedIdentityCredentialResource; +export type CredentialOperationsCreateOrUpdateResponse = CredentialResource; // @public export interface CredentialOperationsDeleteOptionalParams extends coreClient.OperationOptions { @@ -1650,7 +1650,7 @@ export interface CredentialOperationsGetOptionalParams extends coreClient.Operat } // @public -export type CredentialOperationsGetResponse = ManagedIdentityCredentialResource; +export type CredentialOperationsGetResponse = CredentialResource; // @public export interface CredentialOperationsListByFactoryNextOptionalParams extends coreClient.OperationOptions { @@ -2767,7 +2767,7 @@ export interface Expression { // @public export interface ExpressionV2 { operands?: ExpressionV2[]; - operator?: string; + operators?: any[]; type?: ExpressionV2Type; value?: string; } @@ -4459,6 +4459,7 @@ export enum KnownExpressionV2Type { Binary = "Binary", Constant = "Constant", Field = "Field", + NAry = "NAry", Unary = "Unary" } @@ -5363,12 +5364,11 @@ export interface MagentoSource extends TabularSource { // @public export interface ManagedIdentityCredential extends Credential_2 { - resourceId?: string; type: "ManagedIdentity"; } // @public -export interface ManagedIdentityCredentialResource extends SubResource { +export interface ManagedIdentityCredentialResource extends CredentialResource { properties: ManagedIdentityCredential; } @@ -7620,6 +7620,11 @@ export interface ServicePrincipalCredential extends Credential_2 { type: "ServicePrincipal"; } +// @public +export interface ServicePrincipalCredentialResource extends CredentialResource { + properties: ServicePrincipalCredential; +} + // @public export type ServicePrincipalCredentialType = string; @@ -8885,7 +8890,7 @@ export interface WebActivity extends ExecutionActivity { datasets?: DatasetReference[]; disableCertValidation?: boolean; headers?: { - [propertyName: string]: string; + [propertyName: string]: any; }; httpRequestTimeout?: any; linkedServices?: LinkedServiceReference[]; @@ -8936,7 +8941,7 @@ export interface WebHookActivity extends ControlActivity { authentication?: WebActivityAuthentication; body?: any; headers?: { - [propertyName: string]: string; + [propertyName: string]: any; }; method: WebHookActivityMethod; policy?: SecureInputOutputPolicy; diff --git a/sdk/datafactory/arm-datafactory/src/dataFactoryManagementClient.ts b/sdk/datafactory/arm-datafactory/src/dataFactoryManagementClient.ts index a408726aca15..56566703d1c5 100644 --- a/sdk/datafactory/arm-datafactory/src/dataFactoryManagementClient.ts +++ b/sdk/datafactory/arm-datafactory/src/dataFactoryManagementClient.ts @@ -98,7 +98,7 @@ export class DataFactoryManagementClient extends coreClient.ServiceClient { credential: credentials, }; - const packageDetails = `azsdk-js-arm-datafactory/14.1.1`; + const packageDetails = `azsdk-js-arm-datafactory/15.0.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` diff --git a/sdk/datafactory/arm-datafactory/src/models/index.ts b/sdk/datafactory/arm-datafactory/src/models/index.ts index fbc00f5dafbf..5ce87880c5d7 100644 --- a/sdk/datafactory/arm-datafactory/src/models/index.ts +++ b/sdk/datafactory/arm-datafactory/src/models/index.ts @@ -2298,7 +2298,7 @@ export interface ConnectionStateProperties { /** A list of credential resources. */ export interface CredentialListResponse { /** List of credentials. */ - value: ManagedIdentityCredentialResource[]; + value: CredentialResource[]; /** The link to the next page of results, if any remaining results exist. */ nextLink?: string; } @@ -3917,8 +3917,8 @@ export interface ExpressionV2 { type?: ExpressionV2Type; /** Value for Constant/Field Type: string. */ value?: string; - /** Expression operator value Type: string. */ - operator?: string; + /** Expression operator value Type: list of strings. */ + operators?: any[]; /** List of nested expressions. */ operands?: ExpressionV2[]; } @@ -4143,9 +4143,9 @@ export interface ManagedPrivateEndpointResource extends SubResource { } /** Credential resource type. */ -export interface ManagedIdentityCredentialResource extends SubResource { - /** Managed Identity Credential properties. */ - properties: ManagedIdentityCredential; +export interface CredentialResource extends SubResource { + /** Properties of credentials. */ + properties: CredentialUnion; } /** Private Endpoint Connection ARM resource. */ @@ -4193,12 +4193,6 @@ export interface ChangeDataCaptureResource extends SubResource { status?: string; } -/** Credential resource type. */ -export interface CredentialResource extends SubResource { - /** Properties of credentials. */ - properties: CredentialUnion; -} - /** Managed integration runtime status. */ export interface ManagedIntegrationRuntimeStatus extends IntegrationRuntimeStatus { @@ -8188,8 +8182,6 @@ export interface LinkedServiceDebugResource extends SubResourceDebugResource { export interface ManagedIdentityCredential extends Credential { /** Polymorphic discriminator, which specifies the different types this object can be */ type: "ManagedIdentity"; - /** The resource id of user assigned managed identity */ - resourceId?: string; } /** Service principal credential. */ @@ -10173,6 +10165,18 @@ export interface SelfDependencyTumblingWindowTriggerReference size?: string; } +/** Credential resource type. */ +export interface ManagedIdentityCredentialResource extends CredentialResource { + /** Managed Identity Credential properties. */ + properties: ManagedIdentityCredential; +} + +/** Credential resource type. */ +export interface ServicePrincipalCredentialResource extends CredentialResource { + /** Service Principal Credential properties. */ + properties: ServicePrincipalCredential; +} + /** Execute pipeline activity. */ export interface ExecutePipelineActivity extends ControlActivity { /** Polymorphic discriminator, which specifies the different types this object can be */ @@ -10318,7 +10322,7 @@ export interface WebHookActivity extends ControlActivity { /** The timeout within which the webhook should be called back. If there is no value specified, it defaults to 10 minutes. Type: string. Pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). */ timeout?: string; /** Represents the headers that will be sent to the request. For example, to set the language and type on a request: "headers" : { "Accept-Language": "en-us", "Content-Type": "application/json" }. Type: string (or Expression with resultType string). */ - headers?: { [propertyName: string]: string }; + headers?: { [propertyName: string]: any }; /** Represents the payload that will be sent to the endpoint. Required for POST/PUT method, not allowed for GET method Type: string (or Expression with resultType string). */ body?: any; /** Authentication method used for calling the endpoint. */ @@ -10594,7 +10598,7 @@ export interface WebActivity extends ExecutionActivity { /** Web activity target endpoint and path. Type: string (or Expression with resultType string). */ url: any; /** Represents the headers that will be sent to the request. For example, to set the language and type on a request: "headers" : { "Accept-Language": "en-us", "Content-Type": "application/json" }. Type: string (or Expression with resultType string). */ - headers?: { [propertyName: string]: string }; + headers?: { [propertyName: string]: any }; /** Represents the payload that will be sent to the endpoint. Required for POST/PUT method, not allowed for GET method Type: string (or Expression with resultType string). */ body?: any; /** Authentication method used for calling the endpoint. */ @@ -10738,7 +10742,7 @@ export interface AzureFunctionActivity extends ExecutionActivity { /** Name of the Function that the Azure Function Activity will call. Type: string (or Expression with resultType string) */ functionName: any; /** Represents the headers that will be sent to the request. For example, to set the language and type on a request: "headers" : { "Accept-Language": "en-us", "Content-Type": "application/json" }. Type: string (or Expression with resultType string). */ - headers?: { [propertyName: string]: string }; + headers?: { [propertyName: string]: any }; /** Represents the payload that will be sent to the endpoint. Required for POST/PUT method, not allowed for GET method Type: string (or Expression with resultType string). */ body?: any; } @@ -13615,6 +13619,8 @@ export enum KnownExpressionV2Type { Unary = "Unary", /** Binary */ Binary = "Binary", + /** NAry */ + NAry = "NAry", } /** @@ -13625,7 +13631,8 @@ export enum KnownExpressionV2Type { * **Constant** \ * **Field** \ * **Unary** \ - * **Binary** + * **Binary** \ + * **NAry** */ export type ExpressionV2Type = string; @@ -14954,8 +14961,7 @@ export interface CredentialOperationsCreateOrUpdateOptionalParams } /** Contains response data for the createOrUpdate operation. */ -export type CredentialOperationsCreateOrUpdateResponse = - ManagedIdentityCredentialResource; +export type CredentialOperationsCreateOrUpdateResponse = CredentialResource; /** Optional parameters. */ export interface CredentialOperationsGetOptionalParams @@ -14965,7 +14971,7 @@ export interface CredentialOperationsGetOptionalParams } /** Contains response data for the get operation. */ -export type CredentialOperationsGetResponse = ManagedIdentityCredentialResource; +export type CredentialOperationsGetResponse = CredentialResource; /** Optional parameters. */ export interface CredentialOperationsDeleteOptionalParams diff --git a/sdk/datafactory/arm-datafactory/src/models/mappers.ts b/sdk/datafactory/arm-datafactory/src/models/mappers.ts index 26dec7d9c1ce..e0531f7e0d96 100644 --- a/sdk/datafactory/arm-datafactory/src/models/mappers.ts +++ b/sdk/datafactory/arm-datafactory/src/models/mappers.ts @@ -3558,7 +3558,7 @@ export const CredentialListResponse: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "ManagedIdentityCredentialResource", + className: "CredentialResource", }, }, }, @@ -7559,10 +7559,15 @@ export const ExpressionV2: coreClient.CompositeMapper = { name: "String", }, }, - operator: { - serializedName: "operator", + operators: { + serializedName: "operators", type: { - name: "String", + name: "Sequence", + element: { + type: { + name: "any", + }, + }, }, }, operands: { @@ -8225,17 +8230,17 @@ export const ManagedPrivateEndpointResource: coreClient.CompositeMapper = { }, }; -export const ManagedIdentityCredentialResource: coreClient.CompositeMapper = { +export const CredentialResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ManagedIdentityCredentialResource", + className: "CredentialResource", modelProperties: { ...SubResource.type.modelProperties, properties: { serializedName: "properties", type: { name: "Composite", - className: "ManagedIdentityCredential", + className: "Credential", }, }, }, @@ -8386,23 +8391,6 @@ export const ChangeDataCaptureResource: coreClient.CompositeMapper = { }, }; -export const CredentialResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CredentialResource", - modelProperties: { - ...SubResource.type.modelProperties, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "Credential", - }, - }, - }, - }, -}; - export const ManagedIntegrationRuntimeStatus: coreClient.CompositeMapper = { serializedName: "Managed", type: { @@ -19655,12 +19643,6 @@ export const ManagedIdentityCredential: coreClient.CompositeMapper = { polymorphicDiscriminator: Credential.type.polymorphicDiscriminator, modelProperties: { ...Credential.type.modelProperties, - resourceId: { - serializedName: "typeProperties.resourceId", - type: { - name: "String", - }, - }, }, }, }; @@ -24889,6 +24871,40 @@ export const SelfDependencyTumblingWindowTriggerReference: coreClient.CompositeM }, }; +export const ManagedIdentityCredentialResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedIdentityCredentialResource", + modelProperties: { + ...CredentialResource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "ManagedIdentityCredential", + }, + }, + }, + }, +}; + +export const ServicePrincipalCredentialResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ServicePrincipalCredentialResource", + modelProperties: { + ...CredentialResource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "ServicePrincipalCredential", + }, + }, + }, + }, +}; + export const ExecutePipelineActivity: coreClient.CompositeMapper = { serializedName: "ExecutePipeline", type: { @@ -25337,7 +25353,7 @@ export const WebHookActivity: coreClient.CompositeMapper = { serializedName: "typeProperties.headers", type: { name: "Dictionary", - value: { type: { name: "String" } }, + value: { type: { name: "any" } }, }, }, body: { @@ -26262,7 +26278,7 @@ export const WebActivity: coreClient.CompositeMapper = { serializedName: "typeProperties.headers", type: { name: "Dictionary", - value: { type: { name: "String" } }, + value: { type: { name: "any" } }, }, }, body: { @@ -26728,7 +26744,7 @@ export const AzureFunctionActivity: coreClient.CompositeMapper = { serializedName: "typeProperties.headers", type: { name: "Dictionary", - value: { type: { name: "String" } }, + value: { type: { name: "any" } }, }, }, body: { diff --git a/sdk/datafactory/arm-datafactory/src/models/parameters.ts b/sdk/datafactory/arm-datafactory/src/models/parameters.ts index a5b1514be0be..cd0233ee837d 100644 --- a/sdk/datafactory/arm-datafactory/src/models/parameters.ts +++ b/sdk/datafactory/arm-datafactory/src/models/parameters.ts @@ -39,7 +39,7 @@ import { DataFlowDebugCommandRequest as DataFlowDebugCommandRequestMapper, ManagedVirtualNetworkResource as ManagedVirtualNetworkResourceMapper, ManagedPrivateEndpointResource as ManagedPrivateEndpointResourceMapper, - ManagedIdentityCredentialResource as ManagedIdentityCredentialResourceMapper, + CredentialResource as CredentialResourceMapper, PrivateLinkConnectionApprovalRequestResource as PrivateLinkConnectionApprovalRequestResourceMapper, GlobalParameterResource as GlobalParameterResourceMapper, ChangeDataCaptureResource as ChangeDataCaptureResourceMapper, @@ -536,7 +536,7 @@ export const managedPrivateEndpointName: OperationURLParameter = { export const credential: OperationParameter = { parameterPath: "credential", - mapper: ManagedIdentityCredentialResourceMapper, + mapper: CredentialResourceMapper, }; export const credentialName: OperationURLParameter = { diff --git a/sdk/datafactory/arm-datafactory/src/operations/credentialOperations.ts b/sdk/datafactory/arm-datafactory/src/operations/credentialOperations.ts index e1d8a4883504..7f50ba5dd62d 100644 --- a/sdk/datafactory/arm-datafactory/src/operations/credentialOperations.ts +++ b/sdk/datafactory/arm-datafactory/src/operations/credentialOperations.ts @@ -14,7 +14,7 @@ import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { DataFactoryManagementClient } from "../dataFactoryManagementClient"; import { - ManagedIdentityCredentialResource, + CredentialResource, CredentialOperationsListByFactoryNextOptionalParams, CredentialOperationsListByFactoryOptionalParams, CredentialOperationsListByFactoryResponse, @@ -49,7 +49,7 @@ export class CredentialOperationsImpl implements CredentialOperations { resourceGroupName: string, factoryName: string, options?: CredentialOperationsListByFactoryOptionalParams, - ): PagedAsyncIterableIterator { + ): PagedAsyncIterableIterator { const iter = this.listByFactoryPagingAll( resourceGroupName, factoryName, @@ -81,7 +81,7 @@ export class CredentialOperationsImpl implements CredentialOperations { factoryName: string, options?: CredentialOperationsListByFactoryOptionalParams, settings?: PageSettings, - ): AsyncIterableIterator { + ): AsyncIterableIterator { let result: CredentialOperationsListByFactoryResponse; let continuationToken = settings?.continuationToken; if (!continuationToken) { @@ -113,7 +113,7 @@ export class CredentialOperationsImpl implements CredentialOperations { resourceGroupName: string, factoryName: string, options?: CredentialOperationsListByFactoryOptionalParams, - ): AsyncIterableIterator { + ): AsyncIterableIterator { for await (const page of this.listByFactoryPagingPage( resourceGroupName, factoryName, @@ -152,7 +152,7 @@ export class CredentialOperationsImpl implements CredentialOperations { resourceGroupName: string, factoryName: string, credentialName: string, - credential: ManagedIdentityCredentialResource, + credential: CredentialResource, options?: CredentialOperationsCreateOrUpdateOptionalParams, ): Promise { return this.client.sendOperationRequest( @@ -247,7 +247,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { httpMethod: "PUT", responses: { 200: { - bodyMapper: Mappers.ManagedIdentityCredentialResource, + bodyMapper: Mappers.CredentialResource, }, default: { bodyMapper: Mappers.CloudError, @@ -275,7 +275,7 @@ const getOperationSpec: coreClient.OperationSpec = { httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ManagedIdentityCredentialResource, + bodyMapper: Mappers.CredentialResource, }, 304: {}, default: { diff --git a/sdk/datafactory/arm-datafactory/src/operationsInterfaces/credentialOperations.ts b/sdk/datafactory/arm-datafactory/src/operationsInterfaces/credentialOperations.ts index 49dc9a3e8e8d..2289af1ba452 100644 --- a/sdk/datafactory/arm-datafactory/src/operationsInterfaces/credentialOperations.ts +++ b/sdk/datafactory/arm-datafactory/src/operationsInterfaces/credentialOperations.ts @@ -8,7 +8,7 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - ManagedIdentityCredentialResource, + CredentialResource, CredentialOperationsListByFactoryOptionalParams, CredentialOperationsCreateOrUpdateOptionalParams, CredentialOperationsCreateOrUpdateResponse, @@ -30,7 +30,7 @@ export interface CredentialOperations { resourceGroupName: string, factoryName: string, options?: CredentialOperationsListByFactoryOptionalParams, - ): PagedAsyncIterableIterator; + ): PagedAsyncIterableIterator; /** * Creates or updates a credential. * @param resourceGroupName The resource group name. @@ -43,7 +43,7 @@ export interface CredentialOperations { resourceGroupName: string, factoryName: string, credentialName: string, - credential: ManagedIdentityCredentialResource, + credential: CredentialResource, options?: CredentialOperationsCreateOrUpdateOptionalParams, ): Promise; /** diff --git a/sdk/datafactory/arm-datafactory/test/sampleTest.ts b/sdk/datafactory/arm-datafactory/test/sampleTest.ts new file mode 100644 index 000000000000..d64be981b694 --- /dev/null +++ b/sdk/datafactory/arm-datafactory/test/sampleTest.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. + */ + +import { + Recorder, + RecorderStartOptions, + env, +} from "@azure-tools/test-recorder"; +import { assert } from "chai"; +import { Context } from "mocha"; + +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, +}; + +describe("My test", () => { + let recorder: Recorder; + + beforeEach(async function (this: Context) { + recorder = new Recorder(this.currentTest); + await recorder.start(recorderOptions); + }); + + afterEach(async function () { + await recorder.stop(); + }); + + it("sample test", async function () { + console.log("Hi, I'm a test!"); + }); +}); diff --git a/sdk/datafactory/arm-datafactory/tsconfig.json b/sdk/datafactory/arm-datafactory/tsconfig.json index 6f440f5c25a9..3e6ae96443f3 100644 --- a/sdk/datafactory/arm-datafactory/tsconfig.json +++ b/sdk/datafactory/arm-datafactory/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-datafactory": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"