-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Adding ApplicationGroup to EventHub Namespace #17430
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 82 commits
1a41aa1
c6e218f
20796d8
4e69cb9
f6fba70
7a7739c
3123a03
c86de98
06ced13
1d046be
815c3de
3f56089
1e14052
286b8d4
5a58986
2caadf1
09fef2e
ed395f2
47f692e
a5a4148
79f0190
8f37a1a
374f65d
fdff5f4
61e9535
fb9fed9
f28cbcc
a871758
95eb65e
0a01c0c
b4a4ae5
a9631ec
2435f8b
e439fa9
9a5e340
b32af66
e0c8325
388787c
0b4d73b
00226d9
0d40417
b6cfe53
4d8f13b
c8c2121
e766329
d10918d
88ef72a
4c4412e
a37a993
33d7e6c
596f63f
0f26c36
3aacd73
eaa4588
e08385e
18f698e
a32b7c2
174c515
235c710
22b53c8
c739e98
22456ff
46367e8
bc4db64
d9ae9aa
a881456
1793e30
84f5111
3d06638
2b45b3a
258a37b
a208111
009f7ce
8834549
2ac0ebe
c0a9e3d
b2bbd6e
9ae6525
3eb3588
ece2399
f97a2c3
c8e18d6
c9a8e04
a2da1d9
495554c
a9304a8
97648b8
7400768
68b72d7
386b9a6
ffd6f22
276f61c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,347 @@ | ||
{ | ||
"swagger": "2.0", | ||
"info": { | ||
"title": "EventHubManagementClient", | ||
"description": "Azure Event Hubs client", | ||
"version": "2022-01-01-preview" | ||
}, | ||
"host": "management.azure.com", | ||
"schemes": [ | ||
"https" | ||
], | ||
"consumes": [ | ||
"application/json" | ||
], | ||
"produces": [ | ||
"application/json" | ||
], | ||
"security": [ | ||
{ | ||
"azure_auth": [ | ||
"user_impersonation" | ||
] | ||
} | ||
], | ||
"securityDefinitions": { | ||
"azure_auth": { | ||
"type": "oauth2", | ||
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", | ||
"flow": "implicit", | ||
"description": "Azure Active Directory OAuth2 Flow", | ||
"scopes": { | ||
"user_impersonation": "impersonate your user account" | ||
} | ||
} | ||
}, | ||
"paths": { | ||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/applicationGroups": { | ||
"get": { | ||
"tags": [ | ||
"ApplicationGroup" | ||
], | ||
"operationId": "ApplicationGroup_ListByNamespace", | ||
"x-ms-examples": { | ||
"ListApplicationGroups": { | ||
"$ref": "./examples/ApplicationGroup/ApplicationGroupListByNamespace.json" | ||
} | ||
}, | ||
"description": "Gets a list of application groups for a Namespace.", | ||
"parameters": [ | ||
{ | ||
"$ref": "../../../common/v1/definitions.json#/parameters/ResourceGroupNameParameter" | ||
}, | ||
{ | ||
"$ref": "../../../common/v1/definitions.json#/parameters/NamespaceNameParameter" | ||
}, | ||
{ | ||
"$ref": "../../../common/v1/definitions.json#/parameters/ApiVersionParameter" | ||
}, | ||
{ | ||
"$ref": "../../../common/v1/definitions.json#/parameters/SubscriptionIdParameter" | ||
} | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "Namespace ApplicationGroups successfully returned.", | ||
"schema": { | ||
"$ref": "#/definitions/ApplicationGroupListResult" | ||
} | ||
}, | ||
"default": { | ||
"description": "Eventhub error response describing why the operation failed.", | ||
"schema": { | ||
"$ref": "../../../common/v2/definitions.json#/definitions/ErrorResponse" | ||
} | ||
} | ||
}, | ||
"x-ms-pageable": { | ||
"nextLinkName": "nextLink" | ||
} | ||
} | ||
}, | ||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/applicationGroups/{applicationGroupName}": { | ||
"put": { | ||
"tags": [ | ||
"ApplicationGroup" | ||
], | ||
"operationId": "ApplicationGroup_CreateOrUpdateApplicationGroup", | ||
"x-ms-azure-resource": true, | ||
"x-ms-examples": { | ||
"ApplicationGroupCreate": { | ||
"$ref": "./examples/ApplicationGroup/ApplicationGroupCreate.json" | ||
} | ||
}, | ||
"description": "Creates or updates an ApplicationGroup for a Namespace.", | ||
"parameters": [ | ||
{ | ||
"$ref": "../../../common/v1/definitions.json#/parameters/ResourceGroupNameParameter" | ||
}, | ||
{ | ||
"$ref": "../../../common/v1/definitions.json#/parameters/NamespaceNameParameter" | ||
}, | ||
{ | ||
"$ref": "../../../common/v2/definitions.json#/parameters/ApplicationGroupNameParameter" | ||
}, | ||
{ | ||
"name": "parameters", | ||
"in": "body", | ||
"required": true, | ||
"schema": { | ||
"$ref": "#/definitions/ApplicationGroup" | ||
}, | ||
"description": "The ApplicationGroup." | ||
}, | ||
{ | ||
"$ref": "../../../common/v1/definitions.json#/parameters/ApiVersionParameter" | ||
}, | ||
{ | ||
"$ref": "../../../common/v1/definitions.json#/parameters/SubscriptionIdParameter" | ||
} | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "ApplicationGroup successfully created.", | ||
"schema": { | ||
"$ref": "#/definitions/ApplicationGroup" | ||
} | ||
}, | ||
"default": { | ||
"description": "Eventhub error response describing why the operation failed.", | ||
"schema": { | ||
"$ref": "../../../common/v2/definitions.json#/definitions/ErrorResponse" | ||
} | ||
} | ||
} | ||
}, | ||
"delete": { | ||
"tags": [ | ||
"ApplicationGroup" | ||
], | ||
"operationId": "ApplicationGroup_Delete", | ||
"x-ms-examples": { | ||
"ApplicationGroupDelete": { | ||
"$ref": "./examples/ApplicationGroup/ApplicationGroupDelete.json" | ||
} | ||
}, | ||
"description": "Deletes an ApplicationGroup for a Namespace.", | ||
"parameters": [ | ||
{ | ||
"$ref": "../../../common/v1/definitions.json#/parameters/ResourceGroupNameParameter" | ||
}, | ||
{ | ||
"$ref": "../../../common/v1/definitions.json#/parameters/NamespaceNameParameter" | ||
}, | ||
{ | ||
"$ref": "../../../common/v2/definitions.json#/parameters/ApplicationGroupNameParameter" | ||
}, | ||
{ | ||
"$ref": "../../../common/v1/definitions.json#/parameters/ApiVersionParameter" | ||
}, | ||
{ | ||
"$ref": "../../../common/v1/definitions.json#/parameters/SubscriptionIdParameter" | ||
} | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "ApplicationGroup successfully deleted." | ||
}, | ||
"204": { | ||
"description": "No content." | ||
}, | ||
"default": { | ||
"description": "Eventhub error response describing why the operation failed.", | ||
"schema": { | ||
"$ref": "../../../common/v2/definitions.json#/definitions/ErrorResponse" | ||
} | ||
} | ||
} | ||
}, | ||
"get": { | ||
"tags": [ | ||
"ApplicationGroup" | ||
], | ||
"operationId": "ApplicationGroup_Get", | ||
"x-ms-examples": { | ||
"ApplicationGroupGet": { | ||
"$ref": "./examples/ApplicationGroup/ApplicationGroupGet.json" | ||
} | ||
}, | ||
"description": "Gets an ApplicationGroup for a Namespace.", | ||
"parameters": [ | ||
{ | ||
"$ref": "../../../common/v1/definitions.json#/parameters/ResourceGroupNameParameter" | ||
}, | ||
{ | ||
"$ref": "../../../common/v1/definitions.json#/parameters/NamespaceNameParameter" | ||
}, | ||
{ | ||
"$ref": "../../../common/v2/definitions.json#/parameters/ApplicationGroupNameParameter" | ||
}, | ||
{ | ||
"$ref": "../../../common/v1/definitions.json#/parameters/ApiVersionParameter" | ||
}, | ||
{ | ||
"$ref": "../../../common/v1/definitions.json#/parameters/SubscriptionIdParameter" | ||
} | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "Namespace ApplicationGroup returned successfully.", | ||
"schema": { | ||
"$ref": "#/definitions/ApplicationGroup" | ||
} | ||
}, | ||
"default": { | ||
"description": "Eventhub error response describing why the operation failed.", | ||
"schema": { | ||
"$ref": "../../../common/v2/definitions.json#/definitions/ErrorResponse" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"definitions": { | ||
"ApplicationGroupListResult": { | ||
"type": "object", | ||
"properties": { | ||
"value": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/definitions/ApplicationGroup" | ||
}, | ||
"description": "Result of the List Application Groups operation." | ||
}, | ||
"nextLink": { | ||
"readOnly": true, | ||
"type": "string", | ||
"description": "Link to the next set of results. Not empty if Value contains an incomplete list of Authorization Rules" | ||
} | ||
}, | ||
"description": "The response from the List Application Groups operation." | ||
}, | ||
"ApplicationGroup": { | ||
"type": "object", | ||
"properties": { | ||
"properties": { | ||
"type": "object", | ||
"x-ms-client-flatten": true, | ||
"properties": { | ||
"isEnabled": { | ||
"type": "boolean", | ||
"description": "Determines if Application Group is allowed to create connection with namespace or not. Once the isEnabled is set to false, all the existing connections of application group gets dropped and no new connections will be allowed" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have mentioned "no" new connections will be allowed. Do let me know if you think any fixes need to be made. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry I seemed to have read it wrong then. This is good. |
||
}, | ||
"clientAppGroupIdentifier": { | ||
"type": "string", | ||
"description": "The Unique identifier for application group.Supports SAS(SASKeyName=KeyName) or AAD(AADAppID=Guid)" | ||
}, | ||
"policies": { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. instead of an array why not just model it as policies.rateLimitThresholdPolicy.IncomingBytes Isnt it cleaner this way and you can also save on a lot of validations you might have to implement if you leave it as an array? #Closed There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think you are coming from the perspective that there can only be 1 policy based on the metric Id which is applicable? This makes sense to me, but:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @rkmanda This is also a smart approach. But it does not look extendable if we have to add more properties related to "throttlingPolicy" for the same metricId e.g if we want to add "throttlingApplicableTill" timestamp field and has the flexibility that it can be applied at individual metricId, then we loose out on that extendibility. With arrays, yes we need to have certain checks & balances which will be present in service code and will keep getting added as the feature matures. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok please be aware that either ways when you add new policies, they will need to be added in a new API version. API version 1 will have to populate the policies specific to that version and API version 2 will have to add a different set on a GET verb. The other issue with arrays is that when the client wants to modify only a single element, they still have to ensure theres logic in place to manipulate the whole array. So in general we are discouraging teams from using arrays. If you are willing to deal with the validation/ versioning complexities it is fine but pl do so with the understanding of all the implications. |
||
"type": "array", | ||
"items": { | ||
"$ref": "#/definitions/ApplicationGroupPolicy" | ||
}, | ||
"x-ms-identifiers": [], | ||
"description": "List of group policies that define the behavior of application group. The policies can support resource governance scenarios such as limiting ingress or egress traffic." | ||
} | ||
}, | ||
"required": [ | ||
"clientAppGroupIdentifier" | ||
] | ||
}, | ||
"systemData": { | ||
"readOnly": true, | ||
"description": "The system meta data relating to this resource.", | ||
"$ref": "../../../common/v1/definitions.json#/definitions/systemData" | ||
} | ||
}, | ||
"allOf": [ | ||
{ | ||
"$ref": "../../../common/v2/definitions.json#/definitions/ProxyResource" | ||
} | ||
], | ||
"description": "The Application Group object" | ||
}, | ||
"ApplicationGroupPolicy": { | ||
"type": "object", | ||
"discriminator": "type", | ||
"description": "Properties of the Application Group policy", | ||
"properties": { | ||
"name": { | ||
"type": "string", | ||
"description": "The Name of this policy" | ||
}, | ||
"type": { | ||
"type": "string", | ||
"enum": [ | ||
"ThrottlingPolicy" | ||
], | ||
"x-ms-enum": { | ||
"name": "ApplicationGroupPolicyType", | ||
"modelAsString": true | ||
}, | ||
"description": "Application Group Policy types" | ||
} | ||
}, | ||
"required": [ | ||
"name", | ||
"type" | ||
] | ||
}, | ||
"ThrottlingPolicy": { | ||
"type": "object", | ||
"x-ms-discriminator-value": "ThrottlingPolicy", | ||
"description": "Properties of the throttling policy", | ||
"properties": { | ||
"rateLimitThreshold": { | ||
"format": "int64", | ||
"type": "integer", | ||
"description": "The Threshold limit above which the application group will be throttled.Rate limit is always per second." | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. do we have any upper/lower limit, if there is please add in the description. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @yogeshgargmsft Is there one? or is it limited it int64 size? |
||
}, | ||
"metricId": { | ||
"type": "string", | ||
"description": "Metric Id on which the throttle limit should be set, MetricId can be discovered by hovering over Metric in the Metrics section of Event Hub Namespace inside Azure Portal", | ||
"enum": [ | ||
"IncomingBytes", | ||
"OutgoingBytes", | ||
"IncomingMessages", | ||
"OutgoingMessages" | ||
], | ||
"x-ms-enum": { | ||
"name": "MetricId", | ||
"modelAsString": true | ||
} | ||
} | ||
}, | ||
"required": [ | ||
"rateLimitThreshold", | ||
"metricId" | ||
], | ||
"allOf": [ | ||
{ | ||
"$ref": "#/definitions/ApplicationGroupPolicy" | ||
} | ||
] | ||
} | ||
}, | ||
"parameters": {} | ||
} |
Uh oh!
There was an error while loading. Please reload this page.