Skip to content

Commit

Permalink
Release ServiceBus (#10294)
Browse files Browse the repository at this point in the history
  • Loading branch information
LianwMS authored Jul 29, 2020
1 parent b8290b7 commit 0eea57e
Show file tree
Hide file tree
Showing 10 changed files with 212 additions and 23 deletions.
2 changes: 1 addition & 1 deletion sdk/servicebus/arm-servicebus/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2019 Microsoft
Copyright (c) 2020 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
Expand Down
6 changes: 3 additions & 3 deletions sdk/servicebus/arm-servicebus/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ npm install @azure/arm-servicebus

##### Install @azure/ms-rest-nodeauth

- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`.
```bash
npm install @azure/ms-rest-nodeauth
npm install @azure/ms-rest-nodeauth@"^3.0.0"
```

##### Sample code
Expand Down Expand Up @@ -95,5 +96,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to

- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js)


![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fservicebus%2Farm-servicebus%2FREADME.png)
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/servicebus/arm-servicebus/README.png)
22 changes: 11 additions & 11 deletions sdk/servicebus/arm-servicebus/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
"name": "@azure/arm-servicebus",
"author": "Microsoft Corporation",
"description": "ServiceBusManagementClient Library with typescript type definitions for node.js and browser.",
"version": "3.2.0",
"version": "4.0.0",
"dependencies": {
"@azure/ms-rest-azure-js": "^1.3.2",
"@azure/ms-rest-js": "^1.8.1",
"tslib": "^1.9.3"
"@azure/ms-rest-azure-js": "^2.0.1",
"@azure/ms-rest-js": "^2.0.4",
"tslib": "^1.10.0"
},
"keywords": [
"node",
Expand All @@ -20,19 +20,19 @@
"module": "./esm/serviceBusManagementClient.js",
"types": "./esm/serviceBusManagementClient.d.ts",
"devDependencies": {
"typescript": "^3.1.1",
"rollup": "^0.66.2",
"rollup-plugin-node-resolve": "^3.4.0",
"typescript": "^3.5.3",
"rollup": "^1.18.0",
"rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-sourcemaps": "^0.4.2",
"uglify-js": "^3.4.9"
"uglify-js": "^3.6.0"
},
"homepage": "https://github.com/azure/azure-sdk-for-js/tree/master/sdk/servicebus/arm-servicebus",
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/servicebus/arm-servicebus",
"repository": {
"type": "git",
"url": "https://github.com/azure/azure-sdk-for-js.git"
"url": "https://github.com/Azure/azure-sdk-for-js.git"
},
"bugs": {
"url": "https://github.com/azure/azure-sdk-for-js/issues"
"url": "https://github.com/Azure/azure-sdk-for-js/issues"
},
"files": [
"dist/**/*.js",
Expand Down
2 changes: 1 addition & 1 deletion sdk/servicebus/arm-servicebus/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const config = {
*/`
},
plugins: [
nodeResolve({ module: true }),
nodeResolve({ mainFields: ['module', 'main'] }),
sourcemaps()
]
};
Expand Down
59 changes: 55 additions & 4 deletions sdk/servicebus/arm-servicebus/src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -662,11 +662,9 @@ export interface SqlFilter {
sqlExpression?: string;
/**
* This property is reserved for future use. An integer value showing the compatibility level,
* currently hard-coded to 20.
* **NOTE: This property will not be serialized. It can only be populated by the server.**.
* Default value: 20.
* currently hard-coded to 20. Default value: 20.
*/
readonly compatibilityLevel?: number;
compatibilityLevel?: number;
/**
* Value that indicates whether the rule action requires preprocessing. Default value: true.
*/
Expand Down Expand Up @@ -1092,6 +1090,19 @@ export interface SBAuthorizationRuleListResult extends Array<SBAuthorizationRule
nextLink?: string;
}

/**
* @interface
* The response of the List NetworkRuleSet operation.
* @extends Array<NetworkRuleSet>
*/
export interface NetworkRuleSetListResult extends Array<NetworkRuleSet> {
/**
* Link to the next set of results. Not empty if Value contains incomplete list of
* NetworkRuleSet.
*/
nextLink?: string;
}

/**
* @interface
* The result of the List Alias(Disaster Recovery configuration) operation.
Expand Down Expand Up @@ -1601,6 +1612,26 @@ export type NamespacesGetNetworkRuleSetResponse = NetworkRuleSet & {
};
};

/**
* Contains response data for the listNetworkRuleSets operation.
*/
export type NamespacesListNetworkRuleSetsResponse = NetworkRuleSetListResult & {
/**
* The underlying HTTP response.
*/
_response: msRest.HttpResponse & {
/**
* The response body as text (string format)
*/
bodyAsText: string;

/**
* The response body as parsed JSON or XML
*/
parsedBody: NetworkRuleSetListResult;
};
};

/**
* Contains response data for the beginCreateOrUpdate operation.
*/
Expand Down Expand Up @@ -1681,6 +1712,26 @@ export type NamespacesListAuthorizationRulesNextResponse = SBAuthorizationRuleLi
};
};

/**
* Contains response data for the listNetworkRuleSetsNext operation.
*/
export type NamespacesListNetworkRuleSetsNextResponse = NetworkRuleSetListResult & {
/**
* The underlying HTTP response.
*/
_response: msRest.HttpResponse & {
/**
* The response body as text (string format)
*/
bodyAsText: string;

/**
* The response body as parsed JSON or XML
*/
parsedBody: NetworkRuleSetListResult;
};
};

/**
* Contains response data for the checkNameAvailabilityMethod operation.
*/
Expand Down
33 changes: 32 additions & 1 deletion sdk/servicebus/arm-servicebus/src/models/mappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1038,9 +1038,12 @@ export const SqlFilter: msRest.CompositeMapper = {
}
},
compatibilityLevel: {
readOnly: true,
serializedName: "compatibilityLevel",
defaultValue: 20,
constraints: {
InclusiveMaximum: 20,
InclusiveMinimum: 20
},
type: {
name: "Number"
}
Expand Down Expand Up @@ -1685,6 +1688,34 @@ export const SBAuthorizationRuleListResult: msRest.CompositeMapper = {
}
};

export const NetworkRuleSetListResult: msRest.CompositeMapper = {
serializedName: "NetworkRuleSetListResult",
type: {
name: "Composite",
className: "NetworkRuleSetListResult",
modelProperties: {
value: {
serializedName: "",
type: {
name: "Sequence",
element: {
type: {
name: "Composite",
className: "NetworkRuleSet"
}
}
}
},
nextLink: {
serializedName: "nextLink",
type: {
name: "String"
}
}
}
}
};

export const ArmDisasterRecoveryListResult: msRest.CompositeMapper = {
serializedName: "ArmDisasterRecoveryListResult",
type: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export {
MessageCountDetails,
MigrationConfigProperties,
NetworkRuleSet,
NetworkRuleSetListResult,
NWRuleSetIpRules,
NWRuleSetVirtualNetworkRules,
PremiumMessagingRegions,
Expand Down
106 changes: 106 additions & 0 deletions sdk/servicebus/arm-servicebus/src/operations/namespaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,38 @@ export class Namespaces {
callback) as Promise<Models.NamespacesGetNetworkRuleSetResponse>;
}

/**
* Gets list of NetworkRuleSet for a Namespace.
* @param resourceGroupName Name of the Resource group within the Azure subscription.
* @param namespaceName The namespace name
* @param [options] The optional parameters
* @returns Promise<Models.NamespacesListNetworkRuleSetsResponse>
*/
listNetworkRuleSets(resourceGroupName: string, namespaceName: string, options?: msRest.RequestOptionsBase): Promise<Models.NamespacesListNetworkRuleSetsResponse>;
/**
* @param resourceGroupName Name of the Resource group within the Azure subscription.
* @param namespaceName The namespace name
* @param callback The callback
*/
listNetworkRuleSets(resourceGroupName: string, namespaceName: string, callback: msRest.ServiceCallback<Models.NetworkRuleSetListResult>): void;
/**
* @param resourceGroupName Name of the Resource group within the Azure subscription.
* @param namespaceName The namespace name
* @param options The optional parameters
* @param callback The callback
*/
listNetworkRuleSets(resourceGroupName: string, namespaceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.NetworkRuleSetListResult>): void;
listNetworkRuleSets(resourceGroupName: string, namespaceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.NetworkRuleSetListResult>, callback?: msRest.ServiceCallback<Models.NetworkRuleSetListResult>): Promise<Models.NamespacesListNetworkRuleSetsResponse> {
return this.client.sendOperationRequest(
{
resourceGroupName,
namespaceName,
options
},
listNetworkRuleSetsOperationSpec,
callback) as Promise<Models.NamespacesListNetworkRuleSetsResponse>;
}

/**
* Creates or updates a service namespace. Once created, this namespace's resource manifest is
* immutable. This operation is idempotent.
Expand Down Expand Up @@ -650,6 +682,34 @@ export class Namespaces {
listAuthorizationRulesNextOperationSpec,
callback) as Promise<Models.NamespacesListAuthorizationRulesNextResponse>;
}

/**
* Gets list of NetworkRuleSet for a Namespace.
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @param [options] The optional parameters
* @returns Promise<Models.NamespacesListNetworkRuleSetsNextResponse>
*/
listNetworkRuleSetsNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.NamespacesListNetworkRuleSetsNextResponse>;
/**
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @param callback The callback
*/
listNetworkRuleSetsNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.NetworkRuleSetListResult>): void;
/**
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @param options The optional parameters
* @param callback The callback
*/
listNetworkRuleSetsNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.NetworkRuleSetListResult>): void;
listNetworkRuleSetsNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.NetworkRuleSetListResult>, callback?: msRest.ServiceCallback<Models.NetworkRuleSetListResult>): Promise<Models.NamespacesListNetworkRuleSetsNextResponse> {
return this.client.sendOperationRequest(
{
nextPageLink,
options
},
listNetworkRuleSetsNextOperationSpec,
callback) as Promise<Models.NamespacesListNetworkRuleSetsNextResponse>;
}
}

// Operation Specifications
Expand Down Expand Up @@ -1047,6 +1107,31 @@ const getNetworkRuleSetOperationSpec: msRest.OperationSpec = {
serializer
};

const listNetworkRuleSetsOperationSpec: msRest.OperationSpec = {
httpMethod: "GET",
path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/networkRuleSets",
urlParameters: [
Parameters.resourceGroupName,
Parameters.namespaceName1,
Parameters.subscriptionId
],
queryParameters: [
Parameters.apiVersion
],
headerParameters: [
Parameters.acceptLanguage
],
responses: {
200: {
bodyMapper: Mappers.NetworkRuleSetListResult
},
default: {
bodyMapper: Mappers.ErrorResponse
}
},
serializer
};

const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = {
httpMethod: "PUT",
path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}",
Expand Down Expand Up @@ -1170,3 +1255,24 @@ const listAuthorizationRulesNextOperationSpec: msRest.OperationSpec = {
},
serializer
};

const listNetworkRuleSetsNextOperationSpec: msRest.OperationSpec = {
httpMethod: "GET",
baseUrl: "https://management.azure.com",
path: "{nextLink}",
urlParameters: [
Parameters.nextPageLink
],
headerParameters: [
Parameters.acceptLanguage
],
responses: {
200: {
bodyMapper: Mappers.NetworkRuleSetListResult
},
default: {
bodyMapper: Mappers.ErrorResponse
}
},
serializer
};
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import * as msRest from "@azure/ms-rest-js";
import * as msRestAzure from "@azure/ms-rest-azure-js";

const packageName = "@azure/arm-servicebus";
const packageVersion = "3.2.0";
const packageVersion = "4.0.0";

export class ServiceBusManagementClientContext extends msRestAzure.AzureServiceClient {
credentials: msRest.ServiceClientCredentials;
Expand Down
2 changes: 1 addition & 1 deletion sdk/servicebus/arm-servicebus/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"forceConsistentCasingInFileNames": true,
"lib": ["es6"],
"lib": ["es6", "dom"],
"declaration": true,
"outDir": "./esm",
"importHelpers": true
Expand Down

0 comments on commit 0eea57e

Please sign in to comment.