From 9e5ee4167daea731164aa2c9c40023137605585c Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 11 Jan 2023 23:51:49 +0000 Subject: [PATCH] CodeGen from PR 21964 in Azure/azure-rest-api-specs Merge 63d6de9670c84075586b67e106cbb5d6a6e5cc13 into 71121282e39bccae590462648e77bca283df6d2b --- sdk/search/arm-search/CHANGELOG.md | 22 ++++ sdk/search/arm-search/LICENSE | 2 +- sdk/search/arm-search/_meta.json | 10 +- sdk/search/arm-search/package.json | 12 +- .../arm-search/review/arm-search.api.md | 49 ++++++- sdk/search/arm-search/src/models/index.ts | 94 +++++++++++-- sdk/search/arm-search/src/models/mappers.ts | 123 +++++++++++++++++- .../arm-search/src/models/parameters.ts | 2 +- .../arm-search/src/operations/services.ts | 8 +- .../src/operationsInterfaces/services.ts | 4 +- .../arm-search/src/searchManagementClient.ts | 4 +- sdk/search/arm-search/test/sampleTest.ts | 43 ++++++ sdk/search/arm-search/tsconfig.json | 10 +- 13 files changed, 339 insertions(+), 44 deletions(-) create mode 100644 sdk/search/arm-search/test/sampleTest.ts diff --git a/sdk/search/arm-search/CHANGELOG.md b/sdk/search/arm-search/CHANGELOG.md index fc28fb923c59..9ea3c68aa106 100644 --- a/sdk/search/arm-search/CHANGELOG.md +++ b/sdk/search/arm-search/CHANGELOG.md @@ -1,5 +1,27 @@ # Release History +## 3.2.0 (2023-01-11) + +**Features** + + - Added Interface DataPlaneAadOrApiKeyAuthOption + - Added Interface DataPlaneAuthOptions + - Added Interface EncryptionWithCmk + - Added Type Alias AadAuthFailureMode + - Added Type Alias PrivateLinkServiceConnectionProvisioningState + - Added Type Alias SearchEncryptionComplianceStatus + - Added Type Alias SearchEncryptionWithCmk + - Interface PrivateEndpointConnectionProperties has a new optional parameter groupId + - Interface PrivateEndpointConnectionProperties has a new optional parameter provisioningState + - Interface SearchService has a new optional parameter authOptions + - Interface SearchService has a new optional parameter disableLocalAuth + - Interface SearchService has a new optional parameter encryptionWithCmk + - Interface SearchServiceUpdate has a new optional parameter authOptions + - Interface SearchServiceUpdate has a new optional parameter disableLocalAuth + - Interface SearchServiceUpdate has a new optional parameter encryptionWithCmk + - Added Enum KnownPrivateLinkServiceConnectionProvisioningState + + ## 3.1.0 (2022-12-07) **Features** diff --git a/sdk/search/arm-search/LICENSE b/sdk/search/arm-search/LICENSE index 5d1d36e0af80..3a1d9b6f24f7 100644 --- a/sdk/search/arm-search/LICENSE +++ b/sdk/search/arm-search/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2022 Microsoft +Copyright (c) 2023 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/search/arm-search/_meta.json b/sdk/search/arm-search/_meta.json index ce4aa58457e5..bd2e71252d02 100644 --- a/sdk/search/arm-search/_meta.json +++ b/sdk/search/arm-search/_meta.json @@ -1,8 +1,8 @@ { - "commit": "0cd7b3e83d5e7e21222dcc4bdde4565562da0cdf", - "readme": "specification\\search\\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\\search\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.4 --generate-sample=true", + "commit": "2f4ee0531be824007576e912eeecdebdfbbddbb1", + "readme": "specification/search/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=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/search/resource-manager/readme.md --use=@autorest/typescript@6.0.0-rc.5", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.5.2", - "use": "@autorest/typescript@6.0.0-rc.4" + "release_tool": "@azure-tools/js-sdk-release-tools@2.6.0", + "use": "@autorest/typescript@6.0.0-rc.5" } \ No newline at end of file diff --git a/sdk/search/arm-search/package.json b/sdk/search/arm-search/package.json index b7189dba4f50..10042053b32c 100644 --- a/sdk/search/arm-search/package.json +++ b/sdk/search/arm-search/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for SearchManagementClient.", - "version": "3.1.0", + "version": "3.2.0", "engines": { "node": ">=14.0.0" }, @@ -110,13 +110,5 @@ } ] }, - "autoPublish": true, - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-search?view=azure-node-preview" - } + "autoPublish": true } \ No newline at end of file diff --git a/sdk/search/arm-search/review/arm-search.api.md b/sdk/search/arm-search/review/arm-search.api.md index f6f598f7b086..a8576cee83a5 100644 --- a/sdk/search/arm-search/review/arm-search.api.md +++ b/sdk/search/arm-search/review/arm-search.api.md @@ -10,6 +10,9 @@ import { PagedAsyncIterableIterator } from '@azure/core-paging'; import { PollerLike } from '@azure/core-lro'; import { PollOperationState } from '@azure/core-lro'; +// @public +export type AadAuthFailureMode = "http403" | "http401WithBearerChallenge"; + // @public export type AdminKeyKind = "primary" | "secondary"; @@ -72,6 +75,23 @@ export interface CloudErrorBody { target?: string; } +// @public +export interface DataPlaneAadOrApiKeyAuthOption { + aadAuthFailureMode?: AadAuthFailureMode; +} + +// @public +export interface DataPlaneAuthOptions { + aadOrApiKey?: DataPlaneAadOrApiKeyAuthOption; + apiKeyOnly?: Record; +} + +// @public +export interface EncryptionWithCmk { + readonly encryptionComplianceStatus?: SearchEncryptionComplianceStatus; + enforcement?: SearchEncryptionWithCmk; +} + // @public export function getContinuationToken(page: unknown): string | undefined; @@ -93,6 +113,16 @@ export interface IpRule { value?: string; } +// @public +export enum KnownPrivateLinkServiceConnectionProvisioningState { + Canceled = "Canceled", + Deleting = "Deleting", + Failed = "Failed", + Incomplete = "Incomplete", + Succeeded = "Succeeded", + Updating = "Updating" +} + // @public export enum KnownSharedPrivateLinkResourceAsyncOperationResult { Failed = "Failed", @@ -162,8 +192,10 @@ export interface PrivateEndpointConnectionListResult { // @public export interface PrivateEndpointConnectionProperties { + groupId?: string; privateEndpoint?: PrivateEndpointConnectionPropertiesPrivateEndpoint; privateLinkServiceConnectionState?: PrivateEndpointConnectionPropertiesPrivateLinkServiceConnectionState; + provisioningState?: PrivateLinkServiceConnectionProvisioningState; } // @public @@ -257,6 +289,9 @@ export interface PrivateLinkResourcesResult { readonly value?: PrivateLinkResource[]; } +// @public +export type PrivateLinkServiceConnectionProvisioningState = string; + // @public export type PrivateLinkServiceConnectionStatus = "Pending" | "Approved" | "Rejected" | "Disconnected"; @@ -315,6 +350,12 @@ export interface Resource { readonly type?: string; } +// @public +export type SearchEncryptionComplianceStatus = "Compliant" | "NonCompliant"; + +// @public +export type SearchEncryptionWithCmk = "Disabled" | "Enabled" | "Unspecified"; + // @public (undocumented) export class SearchManagementClient extends coreClient.ServiceClient { // (undocumented) @@ -354,6 +395,9 @@ export interface SearchManagementRequestOptions { // @public export interface SearchService extends TrackedResource { + authOptions?: DataPlaneAuthOptions; + disableLocalAuth?: boolean; + encryptionWithCmk?: EncryptionWithCmk; hostingMode?: HostingMode; identity?: Identity; networkRuleSet?: NetworkRuleSet; @@ -375,10 +419,13 @@ export interface SearchServiceListResult { } // @public -export type SearchServiceStatus = "running" | "provisioning" | "deleting" | "degraded" | "disabled" | "error"; +export type SearchServiceStatus = "running" | "provisioning" | "deleting" | "degraded" | "disabled" | "error" | "stopped"; // @public export interface SearchServiceUpdate extends Resource { + authOptions?: DataPlaneAuthOptions; + disableLocalAuth?: boolean; + encryptionWithCmk?: EncryptionWithCmk; hostingMode?: HostingMode; identity?: Identity; location?: string; diff --git a/sdk/search/arm-search/src/models/index.ts b/sdk/search/arm-search/src/models/index.ts index a777b121c7f9..fd8d45610d65 100644 --- a/sdk/search/arm-search/src/models/index.ts +++ b/sdk/search/arm-search/src/models/index.ts @@ -132,12 +132,41 @@ export interface IpRule { value?: string; } +/** Describes a policy that determines how resources within the search service are to be encrypted with Customer Managed Keys. */ +export interface EncryptionWithCmk { + /** Describes how a search service should enforce having one or more non customer encrypted resources. */ + enforcement?: SearchEncryptionWithCmk; + /** + * Describes whether the search service is compliant or not with respect to having non customer encrypted resources. If a service has more than one non customer encrypted resource and 'Enforcement' is 'enabled' then the service will be marked as 'nonCompliant'. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly encryptionComplianceStatus?: SearchEncryptionComplianceStatus; +} + +/** Defines the options for how the data plane API of a Search service authenticates requests. This cannot be set if 'disableLocalAuth' is set to true. */ +export interface DataPlaneAuthOptions { + /** Indicates that only the API key needs to be used for authentication. */ + apiKeyOnly?: Record; + /** Indicates that either the API key or an access token from Azure Active Directory can be used for authentication. */ + aadOrApiKey?: DataPlaneAadOrApiKeyAuthOption; +} + +/** Indicates that either the API key or an access token from Azure Active Directory can be used for authentication. */ +export interface DataPlaneAadOrApiKeyAuthOption { + /** Describes what response the data plane API of a Search service would send for requests that failed authentication. */ + aadAuthFailureMode?: AadAuthFailureMode; +} + /** Describes the properties of an existing Private Endpoint connection to the Azure Cognitive Search service. */ export interface PrivateEndpointConnectionProperties { /** The private endpoint resource from Microsoft.Network provider. */ privateEndpoint?: PrivateEndpointConnectionPropertiesPrivateEndpoint; /** Describes the current state of an existing Private Link Service connection to the Azure Private Endpoint. */ privateLinkServiceConnectionState?: PrivateEndpointConnectionPropertiesPrivateLinkServiceConnectionState; + /** The group id from the provider of resource the private link service connection is for. */ + groupId?: string; + /** The provisioning state of the private link service connection. Can be Updating, Deleting, Failed, Succeeded, or Incomplete */ + provisioningState?: PrivateLinkServiceConnectionProvisioningState; } /** The private endpoint resource from Microsoft.Network provider. */ @@ -200,12 +229,12 @@ export interface Sku { /** Identity for the resource. */ export interface Identity { /** - * The principal ID of resource identity. + * The principal ID of the system-assigned identity of the search service. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly principalId?: string; /** - * The tenant ID of resource. + * The tenant ID of the system-assigned identity of the search service. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly tenantId?: string; @@ -216,7 +245,7 @@ export interface Identity { /** Response containing a list of Azure Cognitive Search services. */ export interface SearchServiceListResult { /** - * The list of search services. + * The list of Search services. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly value?: SearchService[]; @@ -406,6 +435,12 @@ export interface SearchServiceUpdate extends Resource { readonly provisioningState?: ProvisioningState; /** Network specific rules that determine how the Azure Cognitive Search service may be reached. */ networkRuleSet?: NetworkRuleSet; + /** Specifies any policy regarding encryption of resources (such as indexes) using customer manager keys within a search service. */ + encryptionWithCmk?: EncryptionWithCmk; + /** When set to true, calls to the search service will not be permitted to utilize API keys for authentication. This cannot be set to true if 'dataPlaneAuthOptions' are defined. */ + disableLocalAuth?: boolean; + /** Defines the options for how the data plane API of a search service authenticates requests. This cannot be set if 'disableLocalAuth' is set to true. */ + authOptions?: DataPlaneAuthOptions; /** * The list of private endpoint connections to the Azure Cognitive Search service. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -458,6 +493,12 @@ export interface SearchService extends TrackedResource { readonly provisioningState?: ProvisioningState; /** Network specific rules that determine how the Azure Cognitive Search service may be reached. */ networkRuleSet?: NetworkRuleSet; + /** Specifies any policy regarding encryption of resources (such as indexes) using customer manager keys within a search service. */ + encryptionWithCmk?: EncryptionWithCmk; + /** When set to true, calls to the search service will not be permitted to utilize API keys for authentication. This cannot be set to true if 'dataPlaneAuthOptions' are defined. */ + disableLocalAuth?: boolean; + /** Defines the options for how the data plane API of a search service authenticates requests. This cannot be set if 'disableLocalAuth' is set to true. */ + authOptions?: DataPlaneAuthOptions; /** * The list of private endpoint connections to the Azure Cognitive Search service. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -476,11 +517,41 @@ export interface SearchManagementRequestOptions { clientRequestId?: string; } +/** Known values of {@link PrivateLinkServiceConnectionProvisioningState} that the service accepts. */ +export enum KnownPrivateLinkServiceConnectionProvisioningState { + /** The private link service connection is in the process of being created along with other resources for it to be fully functional. */ + Updating = "Updating", + /** The private link service connection is in the process of being deleted. */ + Deleting = "Deleting", + /** The private link service connection has failed to be provisioned or deleted. */ + Failed = "Failed", + /** The private link service connection has finished provisioning and is ready for approval. */ + Succeeded = "Succeeded", + /** Provisioning request for the private link service connection resource has been accepted but the process of creation has not commenced yet. */ + Incomplete = "Incomplete", + /** Provisioning request for the private link service connection resource has been canceled */ + Canceled = "Canceled" +} + +/** + * Defines values for PrivateLinkServiceConnectionProvisioningState. \ + * {@link KnownPrivateLinkServiceConnectionProvisioningState} can be used interchangeably with PrivateLinkServiceConnectionProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Updating**: The private link service connection is in the process of being created along with other resources for it to be fully functional. \ + * **Deleting**: The private link service connection is in the process of being deleted. \ + * **Failed**: The private link service connection has failed to be provisioned or deleted. \ + * **Succeeded**: The private link service connection has finished provisioning and is ready for approval. \ + * **Incomplete**: Provisioning request for the private link service connection resource has been accepted but the process of creation has not commenced yet. \ + * **Canceled**: Provisioning request for the private link service connection resource has been canceled + */ +export type PrivateLinkServiceConnectionProvisioningState = string; + /** Known values of {@link UnavailableNameReason} that the service accepts. */ export enum KnownUnavailableNameReason { - /** Invalid */ + /** The search service name does not match naming requirements. */ Invalid = "Invalid", - /** AlreadyExists */ + /** The search service name is already assigned to a different search service. */ AlreadyExists = "AlreadyExists" } @@ -489,8 +560,8 @@ export enum KnownUnavailableNameReason { * {@link KnownUnavailableNameReason} can be used interchangeably with UnavailableNameReason, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **Invalid** \ - * **AlreadyExists** + * **Invalid**: The search service name does not match naming requirements. \ + * **AlreadyExists**: The search service name is already assigned to a different search service. */ export type UnavailableNameReason = string; @@ -527,9 +598,16 @@ export type SearchServiceStatus = | "deleting" | "degraded" | "disabled" - | "error"; + | "error" + | "stopped"; /** Defines values for ProvisioningState. */ export type ProvisioningState = "succeeded" | "provisioning" | "failed"; +/** Defines values for SearchEncryptionWithCmk. */ +export type SearchEncryptionWithCmk = "Disabled" | "Enabled" | "Unspecified"; +/** Defines values for SearchEncryptionComplianceStatus. */ +export type SearchEncryptionComplianceStatus = "Compliant" | "NonCompliant"; +/** Defines values for AadAuthFailureMode. */ +export type AadAuthFailureMode = "http403" | "http401WithBearerChallenge"; /** Defines values for PrivateLinkServiceConnectionStatus. */ export type PrivateLinkServiceConnectionStatus = | "Pending" diff --git a/sdk/search/arm-search/src/models/mappers.ts b/sdk/search/arm-search/src/models/mappers.ts index 59fb037bccc8..22a536e4817d 100644 --- a/sdk/search/arm-search/src/models/mappers.ts +++ b/sdk/search/arm-search/src/models/mappers.ts @@ -263,6 +263,69 @@ export const IpRule: coreClient.CompositeMapper = { } }; +export const EncryptionWithCmk: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "EncryptionWithCmk", + modelProperties: { + enforcement: { + serializedName: "enforcement", + type: { + name: "Enum", + allowedValues: ["Disabled", "Enabled", "Unspecified"] + } + }, + encryptionComplianceStatus: { + serializedName: "encryptionComplianceStatus", + readOnly: true, + type: { + name: "Enum", + allowedValues: ["Compliant", "NonCompliant"] + } + } + } + } +}; + +export const DataPlaneAuthOptions: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DataPlaneAuthOptions", + modelProperties: { + apiKeyOnly: { + serializedName: "apiKeyOnly", + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + }, + aadOrApiKey: { + serializedName: "aadOrApiKey", + type: { + name: "Composite", + className: "DataPlaneAadOrApiKeyAuthOption" + } + } + } + } +}; + +export const DataPlaneAadOrApiKeyAuthOption: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DataPlaneAadOrApiKeyAuthOption", + modelProperties: { + aadAuthFailureMode: { + serializedName: "aadAuthFailureMode", + type: { + name: "Enum", + allowedValues: ["http403", "http401WithBearerChallenge"] + } + } + } + } +}; + export const PrivateEndpointConnectionProperties: coreClient.CompositeMapper = { type: { name: "Composite", @@ -282,6 +345,18 @@ export const PrivateEndpointConnectionProperties: coreClient.CompositeMapper = { className: "PrivateEndpointConnectionPropertiesPrivateLinkServiceConnectionState" } + }, + groupId: { + serializedName: "groupId", + type: { + name: "String" + } + }, + provisioningState: { + serializedName: "provisioningState", + type: { + name: "String" + } } } } @@ -893,7 +968,8 @@ export const SearchServiceUpdate: coreClient.CompositeMapper = { "deleting", "degraded", "disabled", - "error" + "error", + "stopped" ] } }, @@ -919,6 +995,27 @@ export const SearchServiceUpdate: coreClient.CompositeMapper = { className: "NetworkRuleSet" } }, + encryptionWithCmk: { + serializedName: "properties.encryptionWithCmk", + type: { + name: "Composite", + className: "EncryptionWithCmk" + } + }, + disableLocalAuth: { + serializedName: "properties.disableLocalAuth", + nullable: true, + type: { + name: "Boolean" + } + }, + authOptions: { + serializedName: "properties.authOptions", + type: { + name: "Composite", + className: "DataPlaneAuthOptions" + } + }, privateEndpointConnections: { serializedName: "properties.privateEndpointConnections", readOnly: true, @@ -1035,7 +1132,8 @@ export const SearchService: coreClient.CompositeMapper = { "deleting", "degraded", "disabled", - "error" + "error", + "stopped" ] } }, @@ -1061,6 +1159,27 @@ export const SearchService: coreClient.CompositeMapper = { className: "NetworkRuleSet" } }, + encryptionWithCmk: { + serializedName: "properties.encryptionWithCmk", + type: { + name: "Composite", + className: "EncryptionWithCmk" + } + }, + disableLocalAuth: { + serializedName: "properties.disableLocalAuth", + nullable: true, + type: { + name: "Boolean" + } + }, + authOptions: { + serializedName: "properties.authOptions", + type: { + name: "Composite", + className: "DataPlaneAuthOptions" + } + }, privateEndpointConnections: { serializedName: "properties.privateEndpointConnections", readOnly: true, diff --git a/sdk/search/arm-search/src/models/parameters.ts b/sdk/search/arm-search/src/models/parameters.ts index 95860ef47819..ce3d455016e2 100644 --- a/sdk/search/arm-search/src/models/parameters.ts +++ b/sdk/search/arm-search/src/models/parameters.ts @@ -46,7 +46,7 @@ export const $host: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2020-08-01", + defaultValue: "2022-09-01", isConstant: true, serializedName: "api-version", type: { diff --git a/sdk/search/arm-search/src/operations/services.ts b/sdk/search/arm-search/src/operations/services.ts index b2e8e2b395b5..3a0e9cd9ba91 100644 --- a/sdk/search/arm-search/src/operations/services.ts +++ b/sdk/search/arm-search/src/operations/services.ts @@ -51,7 +51,7 @@ export class ServicesImpl implements Services { } /** - * Gets a list of all search services in the given resource group. + * Gets a list of all Search services in the given resource group. * @param resourceGroupName The name of the resource group within the current subscription. You can * obtain this value from the Azure Resource Manager API or the portal. * @param options The options parameters. @@ -121,7 +121,7 @@ export class ServicesImpl implements Services { } /** - * Gets a list of all search services in the given subscription. + * Gets a list of all Search services in the given subscription. * @param options The options parameters. */ public listBySubscription( @@ -339,7 +339,7 @@ export class ServicesImpl implements Services { } /** - * Gets a list of all search services in the given resource group. + * Gets a list of all Search services in the given resource group. * @param resourceGroupName The name of the resource group within the current subscription. You can * obtain this value from the Azure Resource Manager API or the portal. * @param options The options parameters. @@ -355,7 +355,7 @@ export class ServicesImpl implements Services { } /** - * Gets a list of all search services in the given subscription. + * Gets a list of all Search services in the given subscription. * @param options The options parameters. */ private _listBySubscription( diff --git a/sdk/search/arm-search/src/operationsInterfaces/services.ts b/sdk/search/arm-search/src/operationsInterfaces/services.ts index 68b1b3f3b6cb..416890a9fbcd 100644 --- a/sdk/search/arm-search/src/operationsInterfaces/services.ts +++ b/sdk/search/arm-search/src/operationsInterfaces/services.ts @@ -28,7 +28,7 @@ import { /** Interface representing a Services. */ export interface Services { /** - * Gets a list of all search services in the given resource group. + * Gets a list of all Search services in the given resource group. * @param resourceGroupName The name of the resource group within the current subscription. You can * obtain this value from the Azure Resource Manager API or the portal. * @param options The options parameters. @@ -38,7 +38,7 @@ export interface Services { options?: ServicesListByResourceGroupOptionalParams ): PagedAsyncIterableIterator; /** - * Gets a list of all search services in the given subscription. + * Gets a list of all Search services in the given subscription. * @param options The options parameters. */ listBySubscription( diff --git a/sdk/search/arm-search/src/searchManagementClient.ts b/sdk/search/arm-search/src/searchManagementClient.ts index 5a2e8e2e0c36..6c9ca90bcde4 100644 --- a/sdk/search/arm-search/src/searchManagementClient.ts +++ b/sdk/search/arm-search/src/searchManagementClient.ts @@ -67,7 +67,7 @@ export class SearchManagementClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-search/3.1.0`; + const packageDetails = `azsdk-js-arm-search/3.2.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -120,7 +120,7 @@ export class SearchManagementClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2020-08-01"; + this.apiVersion = options.apiVersion || "2022-09-01"; this.operations = new OperationsImpl(this); this.adminKeys = new AdminKeysImpl(this); this.queryKeys = new QueryKeysImpl(this); diff --git a/sdk/search/arm-search/test/sampleTest.ts b/sdk/search/arm-search/test/sampleTest.ts new file mode 100644 index 000000000000..25aeb3ebcc36 --- /dev/null +++ b/sdk/search/arm-search/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/search/arm-search/tsconfig.json b/sdk/search/arm-search/tsconfig.json index e1056465e215..3e6ae96443f3 100644 --- a/sdk/search/arm-search/tsconfig.json +++ b/sdk/search/arm-search/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-search": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"