diff --git a/sdk/eventhub/arm-eventhub/_meta.json b/sdk/eventhub/arm-eventhub/_meta.json index be640e951bb2..1fac00ae89b8 100644 --- a/sdk/eventhub/arm-eventhub/_meta.json +++ b/sdk/eventhub/arm-eventhub/_meta.json @@ -1,8 +1,8 @@ { - "commit": "7561be58288fad1433038db3f1ccd9794773a03e", + "commit": "eb84a8e87831b63189b700427a973eb7aa9771f1", "readme": "specification/eventhub/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\\eventhub\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.10 --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/eventhub/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.6.2", - "use": "@autorest/typescript@6.0.0-rc.10" + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.4", + "use": "@autorest/typescript@^6.0.12" } \ No newline at end of file diff --git a/sdk/eventhub/arm-eventhub/package.json b/sdk/eventhub/arm-eventhub/package.json index 0694bc1431fe..0372ccb21539 100644 --- a/sdk/eventhub/arm-eventhub/package.json +++ b/sdk/eventhub/arm-eventhub/package.json @@ -3,17 +3,17 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for EventHubManagementClient.", - "version": "5.2.0-beta.2", + "version": "1.0.0-beta.1", "engines": { "node": ">=18.0.0" }, "dependencies": { - "@azure/core-lro": "^2.5.0", + "@azure/core-lro": "^2.5.4", "@azure/abort-controller": "^1.0.0", "@azure/core-paging": "^1.2.0", "@azure/core-client": "^1.7.0", "@azure/core-auth": "^1.3.0", - "@azure/core-rest-pipeline": "^1.8.0", + "@azure/core-rest-pipeline": "^1.12.0", "tslib": "^2.2.0" }, "keywords": [ @@ -32,19 +32,19 @@ "mkdirp": "^2.1.2", "typescript": "~5.2.0", "uglify-js": "^3.4.9", - "rimraf": "^3.0.0", + "rimraf": "^5.0.0", "dotenv": "^16.0.0", + "@azure/dev-tool": "^1.0.0", "@azure/identity": "^3.3.0", "@azure-tools/test-recorder": "^3.0.0", "@azure-tools/test-credential": "^1.0.0", "mocha": "^10.0.0", + "@types/mocha": "^10.0.0", + "esm": "^3.2.18", "@types/chai": "^4.2.8", "chai": "^4.2.0", "cross-env": "^7.0.2", - "@azure/arm-network": "^32.2.0", - "@azure/arm-storage": "^18.0.0", "@types/node": "^18.0.0", - "@azure/dev-tool": "^1.0.0", "ts-node": "^10.0.0" }, "repository": { @@ -79,7 +79,7 @@ "extract-api": "api-extractor run --local", "lint": "echo skipped", "audit": "echo skipped", - "clean": "rimraf dist dist-browser dist-esm test-dist temp types *.tgz *.log", + "clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", "build:node": "echo skipped", "build:browser": "echo skipped", "build:test": "echo skipped", @@ -107,13 +107,5 @@ ] }, "autoPublish": true, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/eventhub/arm-eventhub", - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-eventhub?view=azure-node-preview" - } -} + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/eventhub/arm-eventhub" +} \ No newline at end of file diff --git a/sdk/eventhub/arm-eventhub/src/eventHubManagementClient.ts b/sdk/eventhub/arm-eventhub/src/eventHubManagementClient.ts index 913b57d5aa2d..97c2ea96f003 100644 --- a/sdk/eventhub/arm-eventhub/src/eventHubManagementClient.ts +++ b/sdk/eventhub/arm-eventhub/src/eventHubManagementClient.ts @@ -79,7 +79,7 @@ export class EventHubManagementClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-eventhub/5.2.0-beta.2`; + const packageDetails = `azsdk-js-arm-eventhub/1.0.0-beta.1`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -132,7 +132,7 @@ export class EventHubManagementClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2022-10-01-preview"; + this.apiVersion = options.apiVersion || "2024-01-01"; this.clusters = new ClustersImpl(this); this.namespaces = new NamespacesImpl(this); this.privateEndpointConnections = new PrivateEndpointConnectionsImpl(this); diff --git a/sdk/eventhub/arm-eventhub/src/models/index.ts b/sdk/eventhub/arm-eventhub/src/models/index.ts index edd4ca0bd74d..9bc18631a09f 100644 --- a/sdk/eventhub/arm-eventhub/src/models/index.ts +++ b/sdk/eventhub/arm-eventhub/src/models/index.ts @@ -105,6 +105,14 @@ export interface SystemData { lastModifiedAt?: Date; } +/** Contains all settings for the cluster upgrade window. */ +export interface UpgradePreferences { + /** Preferred day of the week in UTC time to begin an upgrade. If 'Any' is selected, upgrade will proceed at any given weekday */ + startDayOfWeek?: StartDayOfWeek; + /** Preferred hour of the day in UTC time to begin an upgrade */ + startHourOfDay?: number; +} + /** Common fields that are returned in the response for all Azure Resource Manager resources */ export interface Resource { /** @@ -591,6 +599,8 @@ export interface CaptureDescription { export interface Destination { /** Name for capture destination */ name?: string; + /** A value that indicates whether capture description is enabled. */ + identity?: CaptureIdentity; /** Resource id of the storage account to be used to create the blobs */ storageAccountResourceId?: string; /** Blob container Name */ @@ -605,13 +615,21 @@ export interface Destination { dataLakeFolderPath?: string; } +/** A value that indicates whether capture description is enabled. */ +export interface CaptureIdentity { + /** Type of Azure Active Directory Managed Identity. */ + type?: CaptureIdentityType; + /** ARM ID of Managed User Identity. This property is required is the type is UserAssignedIdentity. If type is SystemAssigned, then the System Assigned Identity Associated with the namespace will be used. */ + userAssignedIdentity?: string; +} + /** Properties to configure retention settings for the eventhub */ export interface RetentionDescription { /** Enumerates the possible values for cleanup policy */ cleanupPolicy?: CleanupPolicyRetentionDescription; - /** Number of hours to retain the events for this Event Hub. This value is only used when cleanupPolicy is Delete. If cleanupPolicy is Compaction the returned value of this property is Long.MaxValue */ + /** Number of hours to retain the events for this Event Hub. This value is only used when cleanupPolicy is Delete. If cleanupPolicy is Compact the returned value of this property is Long.MaxValue */ retentionTimeInHours?: number; - /** Number of hours to retain the tombstone markers of a compacted Event Hub. This value is only used when cleanupPolicy is Compaction. Consumer must complete reading the tombstone marker within this specified amount of time if consumer begins from starting offset to ensure they get a valid snapshot for the specific key described by the tombstone marker within the compacted Event Hub */ + /** Number of hours to retain the tombstone markers of a compacted Event Hub. This value is only used when cleanupPolicy is Compact. Consumer must complete reading the tombstone marker within this specified amount of time if consumer begins from starting offset to ensure they get a valid snapshot for the specific key described by the tombstone marker within the compacted Event Hub */ tombstoneRetentionTimeInHours?: number; } @@ -650,8 +668,23 @@ export interface TrackedResource extends Resource { tags?: { [propertyName: string]: string }; } +/** Properties of the PrivateEndpointConnection. */ +export interface PrivateEndpointConnection extends ProxyResource { + /** + * 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 Private Endpoint resource for this Connection. */ + privateEndpoint?: PrivateEndpoint; + /** Details about the state of the connection. */ + privateLinkServiceConnectionState?: ConnectionState; + /** Provisioning state of the Private Endpoint Connection. */ + provisioningState?: EndPointProvisioningState; +} + /** Network Security Perimeter related configurations of a given namespace */ -export interface NetworkSecurityPerimeterConfiguration extends Resource { +export interface NetworkSecurityPerimeterConfiguration extends ProxyResource { /** Provisioning state of NetworkSecurityPerimeter configuration propagation */ provisioningState?: NetworkSecurityPerimeterConfigurationProvisioningState; /** List of Provisioning Issues if any */ @@ -671,21 +704,26 @@ export interface NetworkSecurityPerimeterConfiguration extends Resource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly profile?: NetworkSecurityPerimeterConfigurationPropertiesProfile; -} - -/** Properties of the PrivateEndpointConnection. */ -export interface PrivateEndpointConnection extends ProxyResource { /** - * The system meta data relating to this resource. + * True if the EventHub namespace is backed by another Azure resource and not visible to end users. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly systemData?: SystemData; - /** The Private Endpoint resource for this Connection. */ - privateEndpoint?: PrivateEndpoint; - /** Details about the state of the connection. */ - privateLinkServiceConnectionState?: ConnectionState; - /** Provisioning state of the Private Endpoint Connection. */ - provisioningState?: EndPointProvisioningState; + readonly isBackingResource?: boolean; + /** + * Indicates that the NSP controls related to backing association are only applicable to a specific feature in backing resource's data plane. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly applicableFeatures?: string[]; + /** + * Source Resource Association name + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly parentAssociationName?: string; + /** + * ARM Id of source resource + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly sourceResourceId?: string; } /** Description of topic resource. */ @@ -868,6 +906,11 @@ export interface Cluster extends TrackedResource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly createdAt?: string; + /** + * Provisioning state of the Cluster. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; /** * The UTC time when the Event Hubs Cluster was last updated. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -885,6 +928,8 @@ export interface Cluster extends TrackedResource { readonly status?: string; /** A value that indicates whether Scaling is Supported. */ supportsScaling?: boolean; + /** Properties of the cluster upgrade preferences. */ + upgradePreferences?: UpgradePreferences; } /** Single Namespace item in List or Get Operation */ @@ -991,6 +1036,78 @@ export enum KnownCreatedByType { */ export type CreatedByType = string; +/** Known values of {@link ProvisioningState} that the service accepts. */ +export enum KnownProvisioningState { + /** Unknown */ + Unknown = "Unknown", + /** Creating */ + Creating = "Creating", + /** Deleting */ + Deleting = "Deleting", + /** Scaling */ + Scaling = "Scaling", + /** Active */ + Active = "Active", + /** Failed */ + Failed = "Failed", + /** Succeeded */ + Succeeded = "Succeeded", + /** Canceled */ + Canceled = "Canceled" +} + +/** + * 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 + * **Unknown** \ + * **Creating** \ + * **Deleting** \ + * **Scaling** \ + * **Active** \ + * **Failed** \ + * **Succeeded** \ + * **Canceled** + */ +export type ProvisioningState = string; + +/** Known values of {@link StartDayOfWeek} that the service accepts. */ +export enum KnownStartDayOfWeek { + /** Sunday */ + Sunday = "Sunday", + /** Monday */ + Monday = "Monday", + /** Tuesday */ + Tuesday = "Tuesday", + /** Wednesday */ + Wednesday = "Wednesday", + /** Thursday */ + Thursday = "Thursday", + /** Friday */ + Friday = "Friday", + /** Saturday */ + Saturday = "Saturday", + /** Any */ + Any = "Any" +} + +/** + * Defines values for StartDayOfWeek. \ + * {@link KnownStartDayOfWeek} can be used interchangeably with StartDayOfWeek, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Sunday** \ + * **Monday** \ + * **Tuesday** \ + * **Wednesday** \ + * **Thursday** \ + * **Friday** \ + * **Saturday** \ + * **Any** + */ +export type StartDayOfWeek = string; + /** Known values of {@link SkuName} that the service accepts. */ export enum KnownSkuName { /** Basic */ @@ -1316,8 +1433,8 @@ export type KeyType = string; export enum KnownCleanupPolicyRetentionDescription { /** Delete */ Delete = "Delete", - /** Compaction */ - Compaction = "Compaction" + /** Compact */ + Compact = "Compact" } /** @@ -1326,7 +1443,7 @@ export enum KnownCleanupPolicyRetentionDescription { * this enum contains the known values that the service supports. * ### Known values supported by the service * **Delete** \ - * **Compaction** + * **Compact** */ export type CleanupPolicyRetentionDescription = string; @@ -1441,6 +1558,8 @@ export type EntityStatus = | "Unknown"; /** Defines values for EncodingCaptureDescription. */ export type EncodingCaptureDescription = "Avro" | "AvroDeflate"; +/** Defines values for CaptureIdentityType. */ +export type CaptureIdentityType = "SystemAssigned" | "UserAssigned"; /** Optional parameters. */ export interface ClustersListAvailableClusterRegionOptionalParams @@ -1510,6 +1629,10 @@ export interface ClustersListNamespacesOptionalParams /** Contains response data for the listNamespaces operation. */ export type ClustersListNamespacesResponse = EHNamespaceIdListResult; +/** Optional parameters. */ +export interface ClustersTriggerUpgradePostOptionalParams + extends coreClient.OperationOptions {} + /** Optional parameters. */ export interface ClustersListBySubscriptionNextOptionalParams extends coreClient.OperationOptions {} diff --git a/sdk/eventhub/arm-eventhub/src/models/mappers.ts b/sdk/eventhub/arm-eventhub/src/models/mappers.ts index d8536df8f3b4..3866a683c6e4 100644 --- a/sdk/eventhub/arm-eventhub/src/models/mappers.ts +++ b/sdk/eventhub/arm-eventhub/src/models/mappers.ts @@ -237,6 +237,31 @@ export const SystemData: coreClient.CompositeMapper = { } }; +export const UpgradePreferences: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "UpgradePreferences", + modelProperties: { + startDayOfWeek: { + serializedName: "startDayOfWeek", + type: { + name: "String" + } + }, + startHourOfDay: { + constraints: { + InclusiveMaximum: 23, + InclusiveMinimum: 0 + }, + serializedName: "startHourOfDay", + type: { + name: "Number" + } + } + } + } +}; + export const Resource: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1461,6 +1486,13 @@ export const Destination: coreClient.CompositeMapper = { name: "String" } }, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "CaptureIdentity" + } + }, storageAccountResourceId: { serializedName: "properties.storageAccountResourceId", type: { @@ -1501,6 +1533,28 @@ export const Destination: coreClient.CompositeMapper = { } }; +export const CaptureIdentity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CaptureIdentity", + modelProperties: { + type: { + serializedName: "type", + type: { + name: "Enum", + allowedValues: ["SystemAssigned", "UserAssigned"] + } + }, + userAssignedIdentity: { + serializedName: "userAssignedIdentity", + type: { + name: "String" + } + } + } + } +}; + export const RetentionDescription: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1634,12 +1688,49 @@ export const TrackedResource: coreClient.CompositeMapper = { } }; +export const PrivateEndpointConnection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateEndpointConnection", + modelProperties: { + ...ProxyResource.type.modelProperties, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + }, + privateEndpoint: { + serializedName: "properties.privateEndpoint", + type: { + name: "Composite", + className: "PrivateEndpoint" + } + }, + privateLinkServiceConnectionState: { + serializedName: "properties.privateLinkServiceConnectionState", + type: { + name: "Composite", + className: "ConnectionState" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + type: { + name: "String" + } + } + } + } +}; + export const NetworkSecurityPerimeterConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", className: "NetworkSecurityPerimeterConfiguration", modelProperties: { - ...Resource.type.modelProperties, + ...ProxyResource.type.modelProperties, provisioningState: { serializedName: "properties.provisioningState", type: { @@ -1679,40 +1770,36 @@ export const NetworkSecurityPerimeterConfiguration: coreClient.CompositeMapper = name: "Composite", className: "NetworkSecurityPerimeterConfigurationPropertiesProfile" } - } - } - } -}; - -export const PrivateEndpointConnection: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PrivateEndpointConnection", - modelProperties: { - ...ProxyResource.type.modelProperties, - systemData: { - serializedName: "systemData", + }, + isBackingResource: { + serializedName: "properties.isBackingResource", + readOnly: true, type: { - name: "Composite", - className: "SystemData" + name: "Boolean" } }, - privateEndpoint: { - serializedName: "properties.privateEndpoint", + applicableFeatures: { + serializedName: "properties.applicableFeatures", + readOnly: true, type: { - name: "Composite", - className: "PrivateEndpoint" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - privateLinkServiceConnectionState: { - serializedName: "properties.privateLinkServiceConnectionState", + parentAssociationName: { + serializedName: "properties.parentAssociationName", + readOnly: true, type: { - name: "Composite", - className: "ConnectionState" + name: "String" } }, - provisioningState: { - serializedName: "properties.provisioningState", + sourceResourceId: { + serializedName: "properties.sourceResourceId", + readOnly: true, type: { name: "String" } @@ -2143,6 +2230,13 @@ export const Cluster: coreClient.CompositeMapper = { name: "String" } }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, updatedAt: { serializedName: "properties.updatedAt", readOnly: true, @@ -2169,6 +2263,13 @@ export const Cluster: coreClient.CompositeMapper = { type: { name: "Boolean" } + }, + upgradePreferences: { + serializedName: "properties.upgradePreferences", + type: { + name: "Composite", + className: "UpgradePreferences" + } } } } @@ -2269,6 +2370,9 @@ export const EHNamespace: coreClient.CompositeMapper = { } }, maximumThroughputUnits: { + constraints: { + InclusiveMinimum: 0 + }, serializedName: "properties.maximumThroughputUnits", type: { name: "Number" diff --git a/sdk/eventhub/arm-eventhub/src/models/parameters.ts b/sdk/eventhub/arm-eventhub/src/models/parameters.ts index 42b2cd4bfa38..188468109da8 100644 --- a/sdk/eventhub/arm-eventhub/src/models/parameters.ts +++ b/sdk/eventhub/arm-eventhub/src/models/parameters.ts @@ -65,7 +65,7 @@ export const subscriptionId: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2022-10-01-preview", + defaultValue: "2024-01-01", isConstant: true, serializedName: "api-version", type: { @@ -142,6 +142,7 @@ export const namespaceName: OperationURLParameter = { parameterPath: "namespaceName", mapper: { constraints: { + Pattern: new RegExp("^[a-zA-Z][a-zA-Z0-9-]{6,50}[a-zA-Z0-9]$"), MaxLength: 50, MinLength: 6 }, diff --git a/sdk/eventhub/arm-eventhub/src/operations/clusters.ts b/sdk/eventhub/arm-eventhub/src/operations/clusters.ts index 5581a350b34b..ad66dd6dd5fd 100644 --- a/sdk/eventhub/arm-eventhub/src/operations/clusters.ts +++ b/sdk/eventhub/arm-eventhub/src/operations/clusters.ts @@ -38,6 +38,7 @@ import { ClustersDeleteOptionalParams, ClustersListNamespacesOptionalParams, ClustersListNamespacesResponse, + ClustersTriggerUpgradePostOptionalParams, ClustersListBySubscriptionNextResponse, ClustersListByResourceGroupNextResponse } from "../models"; @@ -525,6 +526,23 @@ export class ClustersImpl implements Clusters { ); } + /** + * Trigger pending cluster upgrades if any. Bypasses any upgrade preferences set by customer. + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param clusterName The name of the Event Hubs Cluster. + * @param options The options parameters. + */ + triggerUpgradePost( + resourceGroupName: string, + clusterName: string, + options?: ClustersTriggerUpgradePostOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, clusterName, options }, + triggerUpgradePostOperationSpec + ); + } + /** * ListBySubscriptionNext * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. @@ -747,6 +765,26 @@ const listNamespacesOperationSpec: coreClient.OperationSpec = { headerParameters: [Parameters.accept], serializer }; +const triggerUpgradePostOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}/triggerUpgrade", + httpMethod: "POST", + responses: { + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName + ], + headerParameters: [Parameters.accept], + serializer +}; const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", diff --git a/sdk/eventhub/arm-eventhub/src/operations/disasterRecoveryConfigs.ts b/sdk/eventhub/arm-eventhub/src/operations/disasterRecoveryConfigs.ts index 8cee5fbb1e9c..af5c19cd4779 100644 --- a/sdk/eventhub/arm-eventhub/src/operations/disasterRecoveryConfigs.ts +++ b/sdk/eventhub/arm-eventhub/src/operations/disasterRecoveryConfigs.ts @@ -597,7 +597,9 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { 200: { bodyMapper: Mappers.ArmDisasterRecovery }, - 201: {}, + 201: { + bodyMapper: Mappers.ArmDisasterRecovery + }, default: { bodyMapper: Mappers.ErrorResponse } diff --git a/sdk/eventhub/arm-eventhub/src/operations/schemaRegistry.ts b/sdk/eventhub/arm-eventhub/src/operations/schemaRegistry.ts index e480b82b809d..6e767c41cec3 100644 --- a/sdk/eventhub/arm-eventhub/src/operations/schemaRegistry.ts +++ b/sdk/eventhub/arm-eventhub/src/operations/schemaRegistry.ts @@ -141,6 +141,7 @@ export class SchemaRegistryImpl implements SchemaRegistry { } /** + * Creates or Updates an EventHub schema group. * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @param schemaGroupName The Schema Group name @@ -167,6 +168,7 @@ export class SchemaRegistryImpl implements SchemaRegistry { } /** + * Deletes an EventHub schema group. * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @param schemaGroupName The Schema Group name @@ -185,6 +187,7 @@ export class SchemaRegistryImpl implements SchemaRegistry { } /** + * Gets the details of an EventHub schema group. * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @param schemaGroupName The Schema Group name diff --git a/sdk/eventhub/arm-eventhub/src/operationsInterfaces/clusters.ts b/sdk/eventhub/arm-eventhub/src/operationsInterfaces/clusters.ts index 468c81b6ed11..6ef3befc400e 100644 --- a/sdk/eventhub/arm-eventhub/src/operationsInterfaces/clusters.ts +++ b/sdk/eventhub/arm-eventhub/src/operationsInterfaces/clusters.ts @@ -22,7 +22,8 @@ import { ClustersUpdateResponse, ClustersDeleteOptionalParams, ClustersListNamespacesOptionalParams, - ClustersListNamespacesResponse + ClustersListNamespacesResponse, + ClustersTriggerUpgradePostOptionalParams } from "../models"; /// @@ -157,4 +158,15 @@ export interface Clusters { clusterName: string, options?: ClustersListNamespacesOptionalParams ): Promise; + /** + * Trigger pending cluster upgrades if any. Bypasses any upgrade preferences set by customer. + * @param resourceGroupName Name of the resource group within the azure subscription. + * @param clusterName The name of the Event Hubs Cluster. + * @param options The options parameters. + */ + triggerUpgradePost( + resourceGroupName: string, + clusterName: string, + options?: ClustersTriggerUpgradePostOptionalParams + ): Promise; } diff --git a/sdk/eventhub/arm-eventhub/src/operationsInterfaces/schemaRegistry.ts b/sdk/eventhub/arm-eventhub/src/operationsInterfaces/schemaRegistry.ts index a3d0a0b7f400..ad1981ae9860 100644 --- a/sdk/eventhub/arm-eventhub/src/operationsInterfaces/schemaRegistry.ts +++ b/sdk/eventhub/arm-eventhub/src/operationsInterfaces/schemaRegistry.ts @@ -32,6 +32,7 @@ export interface SchemaRegistry { options?: SchemaRegistryListByNamespaceOptionalParams ): PagedAsyncIterableIterator; /** + * Creates or Updates an EventHub schema group. * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @param schemaGroupName The Schema Group name @@ -46,6 +47,7 @@ export interface SchemaRegistry { options?: SchemaRegistryCreateOrUpdateOptionalParams ): Promise; /** + * Deletes an EventHub schema group. * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @param schemaGroupName The Schema Group name @@ -58,6 +60,7 @@ export interface SchemaRegistry { options?: SchemaRegistryDeleteOptionalParams ): Promise; /** + * Gets the details of an EventHub schema group. * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @param schemaGroupName The Schema Group name diff --git a/sdk/eventhub/arm-eventhub/test/sampleTest.ts b/sdk/eventhub/arm-eventhub/test/sampleTest.ts new file mode 100644 index 000000000000..25aeb3ebcc36 --- /dev/null +++ b/sdk/eventhub/arm-eventhub/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/eventhub/arm-eventhub/tsconfig.json b/sdk/eventhub/arm-eventhub/tsconfig.json index f1fddb077683..3e6ae96443f3 100644 --- a/sdk/eventhub/arm-eventhub/tsconfig.json +++ b/sdk/eventhub/arm-eventhub/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-eventhub": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"