From d4f5dc7108ea9990c0f79c05432b4f6e54d41eab Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 15 Jun 2023 23:28:00 +0000 Subject: [PATCH] CodeGen from PR 24471 in Azure/azure-rest-api-specs Merge b82a5601b517c81e9720c9ee1fdb5321664de6c7 into 6c0aa20ba0e95bcbacf4ccb4b777fa375201c9fd --- .../arm-containerservice/CHANGELOG.md | 28 +- .../arm-containerservice/_meta.json | 8 +- .../arm-containerservice/package.json | 14 +- .../review/arm-containerservice.api.md | 72 +++++ .../src/containerServiceClient.ts | 4 +- .../arm-containerservice/src/models/index.ts | 111 +++++++ .../src/models/mappers.ts | 284 ++++++++++++++++++ .../src/models/parameters.ts | 2 +- .../operations/maintenanceConfigurations.ts | 3 + .../operations/privateEndpointConnections.ts | 3 + .../arm-containerservice/test/sampleTest.ts | 43 +++ .../arm-containerservice/tsconfig.json | 10 +- 12 files changed, 546 insertions(+), 36 deletions(-) create mode 100644 sdk/containerservice/arm-containerservice/test/sampleTest.ts diff --git a/sdk/containerservice/arm-containerservice/CHANGELOG.md b/sdk/containerservice/arm-containerservice/CHANGELOG.md index 115b0c16cd8b..bdbde3ac1862 100644 --- a/sdk/containerservice/arm-containerservice/CHANGELOG.md +++ b/sdk/containerservice/arm-containerservice/CHANGELOG.md @@ -1,15 +1,23 @@ # Release History + +## 19.1.0 (2023-06-15) + +**Features** -## 19.0.1 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - + - Added Interface AbsoluteMonthlySchedule + - Added Interface DailySchedule + - Added Interface DateSpan + - Added Interface DelegatedResource + - Added Interface MaintenanceWindow + - Added Interface RelativeMonthlySchedule + - Added Interface Schedule + - Added Interface WeeklySchedule + - Added Type Alias Type + - Interface MaintenanceConfiguration has a new optional parameter maintenanceWindow + - Interface ManagedClusterIdentity has a new optional parameter delegatedResources + - Added Enum KnownType + + ## 19.0.0 (2023-05-19) **Features** diff --git a/sdk/containerservice/arm-containerservice/_meta.json b/sdk/containerservice/arm-containerservice/_meta.json index c9e729c77766..6a8d6c417c49 100644 --- a/sdk/containerservice/arm-containerservice/_meta.json +++ b/sdk/containerservice/arm-containerservice/_meta.json @@ -1,8 +1,8 @@ { - "commit": "2455fb21a4bd29399209b0c8583edf1f39cdb35d", + "commit": "12faab053c4239c1df7e11168e435b46f70ce429", "readme": "specification/containerservice/resource-manager/Microsoft.ContainerService/aks/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\\containerservice\\resource-manager\\Microsoft.ContainerService\\aks\\readme.md --use=@autorest/typescript@6.0.2 --generate-sample=true", + "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/containerservice/resource-manager/Microsoft.ContainerService/aks/readme.md --use=@autorest/typescript@^6.0.4", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.6.2", - "use": "@autorest/typescript@6.0.2" + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.1", + "use": "@autorest/typescript@^6.0.4" } \ No newline at end of file diff --git a/sdk/containerservice/arm-containerservice/package.json b/sdk/containerservice/arm-containerservice/package.json index 8217d5b89321..c3f56a8d5659 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": "19.0.1", + "version": "19.1.0", "engines": { "node": ">=14.0.0" }, @@ -111,13 +111,5 @@ ] }, "autoPublish": true, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/containerservice/arm-containerservice", - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-containerservice?view=azure-node-preview" - } -} + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/containerservice/arm-containerservice" +} \ No newline at end of file diff --git a/sdk/containerservice/arm-containerservice/review/arm-containerservice.api.md b/sdk/containerservice/arm-containerservice/review/arm-containerservice.api.md index c700fd4dd05d..891772e92790 100644 --- a/sdk/containerservice/arm-containerservice/review/arm-containerservice.api.md +++ b/sdk/containerservice/arm-containerservice/review/arm-containerservice.api.md @@ -10,6 +10,12 @@ import { OperationState } from '@azure/core-lro'; import { PagedAsyncIterableIterator } from '@azure/core-paging'; import { SimplePollerLike } from '@azure/core-lro'; +// @public +export interface AbsoluteMonthlySchedule { + dayOfMonth: number; + intervalMonths: number; +} + // @public export interface AgentPool extends SubResource { availabilityZones?: string[]; @@ -323,6 +329,25 @@ export interface CredentialResults { readonly kubeconfigs?: CredentialResult[]; } +// @public +export interface DailySchedule { + intervalDays: number; +} + +// @public +export interface DateSpan { + end: Date; + start: Date; +} + +// @public +export interface DelegatedResource { + location?: string; + referralResource?: string; + resourceId?: string; + tenantId?: string; +} + // @public export interface EndpointDependency { domainName?: string; @@ -582,6 +607,15 @@ export enum KnownSnapshotType { NodePool = "NodePool" } +// @public +export enum KnownType { + First = "First", + Fourth = "Fourth", + Last = "Last", + Second = "Second", + Third = "Third" +} + // @public export enum KnownUpgradeChannel { NodeImage = "node-image", @@ -671,6 +705,7 @@ export type LoadBalancerSku = string; // @public export interface MaintenanceConfiguration extends SubResource { + maintenanceWindow?: MaintenanceWindow; notAllowedTime?: TimeSpan[]; readonly systemData?: SystemData; timeInWeek?: TimeInWeek[]; @@ -722,6 +757,16 @@ export interface MaintenanceConfigurationsListByManagedClusterOptionalParams ext // @public export type MaintenanceConfigurationsListByManagedClusterResponse = MaintenanceConfigurationListResult; +// @public +export interface MaintenanceWindow { + durationHours: number; + notAllowedDates?: DateSpan[]; + schedule: Schedule; + startDate?: Date; + startTime: string; + utcOffset?: string; +} + // @public export interface ManagedCluster extends TrackedResource { aadProfile?: ManagedClusterAADProfile; @@ -893,6 +938,9 @@ export interface ManagedClusterHttpProxyConfig { // @public export interface ManagedClusterIdentity { + delegatedResources?: { + [propertyName: string]: DelegatedResource; + }; readonly principalId?: string; readonly tenantId?: string; type?: ResourceIdentityType; @@ -1618,6 +1666,13 @@ export interface PrivateLinkServiceConnectionState { // @public export type PublicNetworkAccess = string; +// @public +export interface RelativeMonthlySchedule { + dayOfWeek: WeekDay; + intervalMonths: number; + weekIndex: Type; +} + // @public export interface ResolvePrivateLinkServiceId { post(resourceGroupName: string, resourceName: string, parameters: PrivateLinkResource, options?: ResolvePrivateLinkServiceIdPostOptionalParams): Promise; @@ -1673,6 +1728,14 @@ export type ScaleSetEvictionPolicy = string; // @public export type ScaleSetPriority = string; +// @public +export interface Schedule { + absoluteMonthly?: AbsoluteMonthlySchedule; + daily?: DailySchedule; + relativeMonthly?: RelativeMonthlySchedule; + weekly?: WeeklySchedule; +} + // @public export interface Snapshot extends TrackedResource { creationData?: CreationData; @@ -1833,6 +1896,9 @@ export interface TrackedResource extends Resource { }; } +// @public +export type Type = string; + // @public export type UpgradeChannel = string; @@ -1846,6 +1912,12 @@ export interface UserAssignedIdentity { // @public export type WeekDay = string; +// @public +export interface WeeklySchedule { + dayOfWeek: WeekDay; + intervalWeeks: number; +} + // @public export interface WindowsGmsaProfile { dnsServer?: string; diff --git a/sdk/containerservice/arm-containerservice/src/containerServiceClient.ts b/sdk/containerservice/arm-containerservice/src/containerServiceClient.ts index 06e41a23713a..ac2270df6a93 100644 --- a/sdk/containerservice/arm-containerservice/src/containerServiceClient.ts +++ b/sdk/containerservice/arm-containerservice/src/containerServiceClient.ts @@ -68,7 +68,7 @@ export class ContainerServiceClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-containerservice/19.0.1`; + const packageDetails = `azsdk-js-arm-containerservice/19.1.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -121,7 +121,7 @@ export class ContainerServiceClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2023-04-01"; + this.apiVersion = options.apiVersion || "2023-06-01"; this.operations = new OperationsImpl(this); this.managedClusters = new ManagedClustersImpl(this); this.maintenanceConfigurations = new MaintenanceConfigurationsImpl(this); diff --git a/sdk/containerservice/arm-containerservice/src/models/index.ts b/sdk/containerservice/arm-containerservice/src/models/index.ts index 5aaac04b5aa4..b125e37f0724 100644 --- a/sdk/containerservice/arm-containerservice/src/models/index.ts +++ b/sdk/containerservice/arm-containerservice/src/models/index.ts @@ -168,12 +168,26 @@ export interface ManagedClusterIdentity { readonly tenantId?: string; /** For more information see [use managed identities in AKS](https://docs.microsoft.com/azure/aks/use-managed-identity). */ type?: ResourceIdentityType; + /** The delegated identity resources assigned to this managed cluster. This can only be set by another Azure Resource Provider, and managed cluster only accept one delegated identity resource. Internal use only. */ + delegatedResources?: { [propertyName: string]: DelegatedResource }; /** The keys must be ARM resource IDs in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. */ userAssignedIdentities?: { [propertyName: string]: ManagedServiceIdentityUserAssignedIdentitiesValue; }; } +/** Delegated resource properties - internal use only. */ +export interface DelegatedResource { + /** The ARM resource id of the delegated resource - internal use only. */ + resourceId?: string; + /** The tenant id of the delegated resource - internal use only. */ + tenantId?: string; + /** The delegation id of the referral delegation (optional) - internal use only. */ + referralResource?: string; + /** The source resource location - internal use only. */ + location?: string; +} + export interface ManagedServiceIdentityUserAssignedIdentitiesValue { /** * The principal id of user assigned identity. @@ -1009,6 +1023,74 @@ export interface TimeSpan { end?: Date; } +/** Maintenance window used to configure scheduled auto-upgrade for a Managed Cluster. */ +export interface MaintenanceWindow { + /** Recurrence schedule for the maintenance window. */ + schedule: Schedule; + /** Length of maintenance window range from 4 to 24 hours. */ + durationHours: number; + /** The UTC offset in format +/-HH:mm. For example, '+05:30' for IST and '-07:00' for PST. If not specified, the default is '+00:00'. */ + utcOffset?: string; + /** The date the maintenance window activates. If the current date is before this date, the maintenance window is inactive and will not be used for upgrades. If not specified, the maintenance window will be active right away. */ + startDate?: Date; + /** The start time of the maintenance window. Accepted values are from '00:00' to '23:59'. 'utcOffset' applies to this field. For example: '02:00' with 'utcOffset: +02:00' means UTC time '00:00'. */ + startTime: string; + /** Date ranges on which upgrade is not allowed. 'utcOffset' applies to this field. For example, with 'utcOffset: +02:00' and 'dateSpan' being '2022-12-23' to '2023-01-03', maintenance will be blocked from '2022-12-22 22:00' to '2023-01-03 22:00' in UTC time. */ + notAllowedDates?: DateSpan[]; +} + +/** One and only one of the schedule types should be specified. Choose either 'daily', 'weekly', 'absoluteMonthly' or 'relativeMonthly' for your maintenance schedule. */ +export interface Schedule { + /** For schedules like: 'recur every day' or 'recur every 3 days'. */ + daily?: DailySchedule; + /** For schedules like: 'recur every Monday' or 'recur every 3 weeks on Wednesday'. */ + weekly?: WeeklySchedule; + /** For schedules like: 'recur every month on the 15th' or 'recur every 3 months on the 20th'. */ + absoluteMonthly?: AbsoluteMonthlySchedule; + /** For schedules like: 'recur every month on the first Monday' or 'recur every 3 months on last Friday'. */ + relativeMonthly?: RelativeMonthlySchedule; +} + +/** For schedules like: 'recur every day' or 'recur every 3 days'. */ +export interface DailySchedule { + /** Specifies the number of days between each set of occurrences. */ + intervalDays: number; +} + +/** For schedules like: 'recur every Monday' or 'recur every 3 weeks on Wednesday'. */ +export interface WeeklySchedule { + /** Specifies the number of weeks between each set of occurrences. */ + intervalWeeks: number; + /** Specifies on which day of the week the maintenance occurs. */ + dayOfWeek: WeekDay; +} + +/** For schedules like: 'recur every month on the 15th' or 'recur every 3 months on the 20th'. */ +export interface AbsoluteMonthlySchedule { + /** Specifies the number of months between each set of occurrences. */ + intervalMonths: number; + /** The date of the month. */ + dayOfMonth: number; +} + +/** For schedules like: 'recur every month on the first Monday' or 'recur every 3 months on last Friday'. */ +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. */ + weekIndex: Type; + /** Specifies on which day of the week the maintenance occurs. */ + dayOfWeek: WeekDay; +} + +/** For example, between '2022-12-23' and '2023-01-05'. */ +export interface DateSpan { + /** The start date of the date span. */ + start: Date; + /** The end date of the date span. */ + end: Date; +} + /** Reference to another subresource. */ export interface SubResource { /** @@ -1286,6 +1368,8 @@ export interface MaintenanceConfiguration extends SubResource { timeInWeek?: TimeInWeek[]; /** Time slots on which upgrade is not allowed. */ notAllowedTime?: TimeSpan[]; + /** Maintenance window for the maintenance configuration. */ + maintenanceWindow?: MaintenanceWindow; } /** Agent Pool. */ @@ -2277,6 +2361,33 @@ export enum KnownWeekDay { */ export type WeekDay = string; +/** Known values of {@link Type} that the service accepts. */ +export enum KnownType { + /** First week of the month. */ + First = "First", + /** Second week of the month. */ + Second = "Second", + /** Third week of the month. */ + Third = "Third", + /** Fourth week of the month. */ + Fourth = "Fourth", + /** Last week of the month. */ + Last = "Last" +} + +/** + * Defines values for Type. \ + * {@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. + */ +export type Type = string; + /** Known values of {@link PrivateEndpointConnectionProvisioningState} that the service accepts. */ export enum KnownPrivateEndpointConnectionProvisioningState { /** Canceled */ diff --git a/sdk/containerservice/arm-containerservice/src/models/mappers.ts b/sdk/containerservice/arm-containerservice/src/models/mappers.ts index 5f934192f0dc..a6caf14b9dbd 100644 --- a/sdk/containerservice/arm-containerservice/src/models/mappers.ts +++ b/sdk/containerservice/arm-containerservice/src/models/mappers.ts @@ -396,6 +396,13 @@ export const ManagedClusterIdentity: coreClient.CompositeMapper = { allowedValues: ["SystemAssigned", "UserAssigned", "None"] } }, + delegatedResources: { + serializedName: "delegatedResources", + type: { + name: "Dictionary", + value: { type: { name: "Composite", className: "DelegatedResource" } } + } + }, userAssignedIdentities: { serializedName: "userAssignedIdentities", type: { @@ -412,6 +419,39 @@ export const ManagedClusterIdentity: coreClient.CompositeMapper = { } }; +export const DelegatedResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DelegatedResource", + modelProperties: { + resourceId: { + serializedName: "resourceId", + type: { + name: "String" + } + }, + tenantId: { + serializedName: "tenantId", + type: { + name: "Uuid" + } + }, + referralResource: { + serializedName: "referralResource", + type: { + name: "String" + } + }, + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + export const ManagedServiceIdentityUserAssignedIdentitiesValue: coreClient.CompositeMapper = { type: { name: "Composite", @@ -2823,6 +2863,243 @@ export const TimeSpan: coreClient.CompositeMapper = { } }; +export const MaintenanceWindow: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MaintenanceWindow", + modelProperties: { + schedule: { + serializedName: "schedule", + type: { + name: "Composite", + className: "Schedule" + } + }, + durationHours: { + defaultValue: 24, + constraints: { + InclusiveMaximum: 24, + InclusiveMinimum: 4 + }, + serializedName: "durationHours", + required: true, + type: { + name: "Number" + } + }, + utcOffset: { + constraints: { + Pattern: new RegExp("^(-|\\+)[0-9]{2}:[0-9]{2}$") + }, + serializedName: "utcOffset", + type: { + name: "String" + } + }, + startDate: { + serializedName: "startDate", + type: { + name: "Date" + } + }, + startTime: { + constraints: { + Pattern: new RegExp("^\\d{2}:\\d{2}$") + }, + serializedName: "startTime", + required: true, + type: { + name: "String" + } + }, + notAllowedDates: { + serializedName: "notAllowedDates", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DateSpan" + } + } + } + } + } + } +}; + +export const Schedule: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Schedule", + modelProperties: { + daily: { + serializedName: "daily", + type: { + name: "Composite", + className: "DailySchedule" + } + }, + weekly: { + serializedName: "weekly", + type: { + name: "Composite", + className: "WeeklySchedule" + } + }, + absoluteMonthly: { + serializedName: "absoluteMonthly", + type: { + name: "Composite", + className: "AbsoluteMonthlySchedule" + } + }, + relativeMonthly: { + serializedName: "relativeMonthly", + type: { + name: "Composite", + className: "RelativeMonthlySchedule" + } + } + } + } +}; + +export const DailySchedule: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DailySchedule", + modelProperties: { + intervalDays: { + constraints: { + InclusiveMaximum: 7, + InclusiveMinimum: 1 + }, + serializedName: "intervalDays", + required: true, + type: { + name: "Number" + } + } + } + } +}; + +export const WeeklySchedule: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "WeeklySchedule", + modelProperties: { + intervalWeeks: { + constraints: { + InclusiveMaximum: 4, + InclusiveMinimum: 1 + }, + serializedName: "intervalWeeks", + required: true, + type: { + name: "Number" + } + }, + dayOfWeek: { + serializedName: "dayOfWeek", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const AbsoluteMonthlySchedule: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AbsoluteMonthlySchedule", + modelProperties: { + intervalMonths: { + constraints: { + InclusiveMaximum: 6, + InclusiveMinimum: 1 + }, + serializedName: "intervalMonths", + required: true, + type: { + name: "Number" + } + }, + dayOfMonth: { + constraints: { + InclusiveMaximum: 31, + InclusiveMinimum: 1 + }, + serializedName: "dayOfMonth", + required: true, + type: { + name: "Number" + } + } + } + } +}; + +export const RelativeMonthlySchedule: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RelativeMonthlySchedule", + modelProperties: { + intervalMonths: { + constraints: { + InclusiveMaximum: 6, + InclusiveMinimum: 1 + }, + serializedName: "intervalMonths", + required: true, + type: { + name: "Number" + } + }, + weekIndex: { + serializedName: "weekIndex", + required: true, + type: { + name: "String" + } + }, + dayOfWeek: { + serializedName: "dayOfWeek", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const DateSpan: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DateSpan", + modelProperties: { + start: { + serializedName: "start", + required: true, + type: { + name: "Date" + } + }, + end: { + serializedName: "end", + required: true, + type: { + name: "Date" + } + } + } + } +}; + export const SubResource: coreClient.CompositeMapper = { type: { name: "Composite", @@ -3484,6 +3761,13 @@ export const MaintenanceConfiguration: coreClient.CompositeMapper = { } } } + }, + maintenanceWindow: { + serializedName: "properties.maintenanceWindow", + type: { + name: "Composite", + className: "MaintenanceWindow" + } } } } diff --git a/sdk/containerservice/arm-containerservice/src/models/parameters.ts b/sdk/containerservice/arm-containerservice/src/models/parameters.ts index 7dc249a3cc6c..fbb1335d1704 100644 --- a/sdk/containerservice/arm-containerservice/src/models/parameters.ts +++ b/sdk/containerservice/arm-containerservice/src/models/parameters.ts @@ -51,7 +51,7 @@ export const $host: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2023-04-01", + defaultValue: "2023-06-01", isConstant: true, serializedName: "api-version", type: { diff --git a/sdk/containerservice/arm-containerservice/src/operations/maintenanceConfigurations.ts b/sdk/containerservice/arm-containerservice/src/operations/maintenanceConfigurations.ts index 3c992dd8bd5b..bd6ef33158a6 100644 --- a/sdk/containerservice/arm-containerservice/src/operations/maintenanceConfigurations.ts +++ b/sdk/containerservice/arm-containerservice/src/operations/maintenanceConfigurations.ts @@ -275,6 +275,9 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { 200: { bodyMapper: Mappers.MaintenanceConfiguration }, + 201: { + bodyMapper: Mappers.MaintenanceConfiguration + }, default: { bodyMapper: Mappers.CloudError } diff --git a/sdk/containerservice/arm-containerservice/src/operations/privateEndpointConnections.ts b/sdk/containerservice/arm-containerservice/src/operations/privateEndpointConnections.ts index ead103dcbce3..756c2e8b547a 100644 --- a/sdk/containerservice/arm-containerservice/src/operations/privateEndpointConnections.ts +++ b/sdk/containerservice/arm-containerservice/src/operations/privateEndpointConnections.ts @@ -257,6 +257,9 @@ const updateOperationSpec: coreClient.OperationSpec = { 200: { bodyMapper: Mappers.PrivateEndpointConnection }, + 201: { + bodyMapper: Mappers.PrivateEndpointConnection + }, default: { bodyMapper: Mappers.CloudError } diff --git a/sdk/containerservice/arm-containerservice/test/sampleTest.ts b/sdk/containerservice/arm-containerservice/test/sampleTest.ts new file mode 100644 index 000000000000..25aeb3ebcc36 --- /dev/null +++ b/sdk/containerservice/arm-containerservice/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/containerservice/arm-containerservice/tsconfig.json b/sdk/containerservice/arm-containerservice/tsconfig.json index 5bad5556bbfd..3e6ae96443f3 100644 --- a/sdk/containerservice/arm-containerservice/tsconfig.json +++ b/sdk/containerservice/arm-containerservice/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-containerservice": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"