Skip to content
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

Bump System.Data.SqlClient from 4.8.3 to 4.8.5 in /samples/e2e/EventHubsCaptureEventGridDemo/FunctionEGDWDumper #506

Open
wants to merge 97 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
97 commits
Select commit Hold shift + click to select a range
9c355e9
draft
serkantkaraca Jun 27, 2019
037168f
Adding control plane + data plane EH sample
serkantkaraca Jun 28, 2019
37cf05a
SDK ref fixes for EH RBAC sample
serkantkaraca Jun 28, 2019
2dba515
Merge branch 'master' of https://github.com/Azure/azure-event-hubs in…
serkantkaraca Jul 1, 2019
118133b
Updates for 3.0.0 RBAC release
JamesBirdsall Jul 1, 2019
27c213b
Adding RBAC custom role sample
serkantkaraca Jul 2, 2019
51587c8
Remove unintented files
serkantkaraca Jul 2, 2019
10ec29a
Reverting unintended changes
serkantkaraca Jul 2, 2019
c030b6d
readme changes
serkantkaraca Jul 2, 2019
1306652
minor changes
serkantkaraca Jul 2, 2019
eda4dbd
Refactoring token acquisition
serkantkaraca Jul 2, 2019
4a87ed4
Update readme.md
serkantkaraca Jul 2, 2019
3337741
Update readme.md
serkantkaraca Jul 2, 2019
d47a55f
Merge pull request #446 from Azure/serkar.AddCustomRbacEhSample
serkantkaraca Jul 2, 2019
8caf262
Adding sender sample for rbac
ShubhaVijayasarathy Jul 3, 2019
edb6409
Merge pull request #445 from Azure/RBACupdates
ShubhaVijayasarathy Jul 17, 2019
9940943
Merge branch 'master' of https://github.com/Azure/azure-event-hubs in…
serkantkaraca Jul 18, 2019
23d3eaa
Moving Managed Identity sample to .NET Standard SDK
serkantkaraca Jul 18, 2019
566ef0c
Remove unintended SampleSender changes
serkantkaraca Jul 18, 2019
12583b9
Revert "Updates for Java client 3.0.0 RBAC release" (#448)
ShubhaVijayasarathy Jul 22, 2019
f335055
Merge pull request #449 from Azure/MsiSampleChanges
serkantkaraca Jul 22, 2019
ff85c7c
Move EH SDK to 4.0.0
serkantkaraca Jul 22, 2019
582fc0b
Merge pull request #451 from Azure/FixRbcSample2
serkantkaraca Jul 22, 2019
bb7a402
Remove CxCache dependency in ReliableSender sample
serkantkaraca Jul 22, 2019
526c56c
-
serkantkaraca Jul 22, 2019
a5895c7
Merge pull request #452 from Azure/RemoveCxCacheReferences
serkantkaraca Jul 22, 2019
225db71
Reorging the folder structure
ShubhaVijayasarathy Jul 22, 2019
d548f8f
adding samples to Messaging.SErviceBus
ShubhaVijayasarathy Jul 22, 2019
a35a76f
Update App.config
serkantkaraca Jul 24, 2019
5cb25d3
Moving SFProcessor sample into SDK folder
serkantkaraca Jul 25, 2019
a9876ef
Merge pull request #453 from Azure/reorg_samples
serkantkaraca Jul 25, 2019
d096ca2
Update Java samples for 3.0.0 client (#455)
JamesBirdsall Aug 29, 2019
12b87e6
Consolidate all Java RBAC sample work (#456)
JamesBirdsall Aug 29, 2019
cbc412e
updated to use the 5.0.0 SDK (#459)
spelluru Oct 23, 2019
790471f
Update samples for client 3.0.2 (#457)
JamesBirdsall Oct 23, 2019
8cf2471
updated samples used by tutorials to use the new package
spelluru Oct 30, 2019
17f6ceb
updated Anomaly Detector and Wind Turbine Data Generator samples for …
spelluru Nov 5, 2019
a4354c1
updated Anomaly Detector and WindTurbineDataGenerator samples for Pre…
spelluru Dec 5, 2019
2be764e
updated for Preview 6
spelluru Dec 6, 2019
78ec550
updated based on feedback from Serkant and Jesse
spelluru Jan 9, 2020
000b20a
minor update to UI - fully qualified name
spelluru Jan 9, 2020
40fa580
added using statements
spelluru Jan 9, 2020
284fd90
Merge pull request #463 from spelluru/newpackagesamples1029
serkantkaraca Jan 13, 2020
f4f50e8
fixed the receive code
spelluru Jan 15, 2020
f65204b
Merge pull request #464 from spelluru/fixmsi0115
spelluru Jan 16, 2020
72fc2bb
Updated samples to use the latest .NET package
spelluru Jan 30, 2020
1b66691
Merge pull request #466 from spelluru/ehubsamples0130
spelluru Feb 12, 2020
3527fe9
Add async send sample (#468)
JamesBirdsall Apr 22, 2020
7ed366d
updated the readme to point to new samples. Cleaned up too.
spelluru Apr 30, 2020
5a42971
Merge pull request #469 from spelluru/sdklinks0430
spelluru May 6, 2020
5a16c14
Updated to use Functions runtime version 3 (latest)
spelluru Jun 9, 2020
5acf9e8
removed publish profile
spelluru Jun 9, 2020
3af21a2
Merge pull request #471 from spelluru/egridintegrationsample0608
spelluru Jun 9, 2020
e9e01dd
updated to use Azure.Messaging.EventHubs 5.2 - latest stable version
spelluru Dec 8, 2020
d6bf8b1
Merge pull request #472 from spelluru/ehubegridintegration1207
serkantkaraca Dec 8, 2020
da5dd91
modified readmes to point to Track 2 content; moved files to right fo…
Mar 17, 2021
aa20765
addressed review feedback
Mar 23, 2021
8576c5e
Simplify readme for RBAC
ramya-rao-a Apr 2, 2021
719324b
Re-order steps for custom role sample for clarity
ramya-rao-a Apr 2, 2021
de8fe23
Consolidate intro and note, use quick start links
ramya-rao-a Apr 2, 2021
ca68875
Merge pull request #475 from ramya-rao-a/lily-patch
lilyjma Apr 5, 2021
f471963
Merge pull request #474 from Azure/lily-patch
lilyjma Apr 6, 2021
97caf51
moved samples to approach directories
Apr 7, 2021
1362353
Remove duplicate sample for EventHubsCaptureEventGridDemo
ramya-rao-a Apr 9, 2021
6d8fc54
Merge pull request #477 from ramya-rao-a/remove-dupe
spelluru Apr 12, 2021
10df2c2
Merge pull request #476 from Azure/lily-patch2
spelluru Apr 12, 2021
809eb4c
Clean up of the EventHubsCaptureEventGridDemo sample in the azure-eve…
zedy-wj Apr 15, 2021
71ed5ea
Add pointers to new packages in readme files at the root and for .Net…
ramya-rao-a Apr 16, 2021
d961416
Updating to use EventHubsCaptureAvroBlobUri to create the BlobClient …
zedy-wj Apr 19, 2021
4cadf09
Updating the Reference
zedy-wj Apr 21, 2021
bffa22a
Merge pull request #479 from zedy-wj/CleanupEventhub
spelluru Apr 23, 2021
5c333eb
Sample using Event Hub Log4j Appender (#482)
sagar027 Sep 2, 2021
15b99a5
Update readme with pointers to newer samples (#481)
ramya-rao-a Sep 22, 2021
3cb13d5
Fix incorrect redirection (#467)
madushajg Sep 22, 2021
0b193ff
fix code comment (#485)
v-thpra Mar 7, 2022
df61522
Addition of Schema to Schema groups via Powershell
Saglodha Apr 7, 2022
af22936
Add schema to schema groups via Bash
Saglodha Apr 7, 2022
ab93acf
Added PS variables
Saglodha Apr 28, 2022
d910592
Merge pull request #488 from Saglodha/master
serkantkaraca Apr 29, 2022
f8c2795
Updating the sample to use latest packages
spelluru May 6, 2022
fe3a7bc
ARM template
spelluru May 6, 2022
6c396fc
Delete samples/e2e/EventHubsCaptureEventGridDemo/DWDumper directory
spelluru May 6, 2022
2570003
Delete samples/e2e/EventHubsCaptureEventGridDemo/media directory
spelluru May 6, 2022
2f0f8d7
Delete samples/e2e/EventHubsCaptureEventGridDemo/scripts directory
spelluru May 6, 2022
3702362
Merge pull request #1 from spelluru/spelluru-patch-1
spelluru May 6, 2022
34706f7
Duplicate of Data.cs
spelluru May 6, 2022
5723a0c
Merge pull request #490 from spelluru/master
spelluru May 13, 2022
c38cded
Documentation
spelluru Jul 27, 2022
e1b741c
Delete Readme.md
spelluru Jul 27, 2022
f289b69
Rename store-captured-data-data-warehouse.md to readme.md
spelluru Jul 27, 2022
e51e725
Update readme.md
spelluru Jul 27, 2022
4c2252a
Add files via upload
spelluru Jul 27, 2022
0412e88
Merge branch 'master' of https://github.com/spelluru/azure-event-hubs…
spelluru Jul 27, 2022
4e4f4c4
folders
spelluru Jul 27, 2022
cbb06c5
Merge pull request #500 from spelluru/ehubegridfuncdemo0727
kasun04 Jul 27, 2022
7c5a448
Microsoft mandatory file (#504)
microsoft-github-policy-service[bot] Jan 27, 2023
ead3344
Bump System.Data.SqlClient
dependabot[bot] Apr 16, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Addition of Schema to Schema groups via Powershell
This sample would act as reference to add schema to schema groups in event hubs via PowerShell
Saglodha authored Apr 7, 2022
commit df6152208cc8deea7c0fb89914e19be513470824
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@

#Step 1 - Pass in AD Application details below to be able to fetch authorization token against legitimate Service Principal.
$Fields = @{
grant_type = "client_credentials"
client_id = "<Application_ID>"
resource = "https://eventhubs.azure.net"
client_secret = "<Application_Secret>"
};


$response = Invoke-RestMethod –Uri "https://login.microsoftonline.com/<Tenant_ID>/oauth2/token" –ContentType "application/x-www-form-urlencoded" –Method POST –Body $Fields

#response would have bearer token in the properties that we would use to trigger next call.

#Step 2- You can declare schema JSON associated to schema in $Body variable below
$Body = @"
{
"namespace": "com.azure.schemaregistry.samples",
"type": "record",
"name": "Order",
"fields": [
{
"name": "id",
"type": "string"
},
{
"name": "amount",
"type": "double"
}
]
}
"@

#Step 3- This Uri needs to have details added- namespace name, schema group name and schema name respectively.
$uri = 'https://<Namespace_Name>.servicebus.windows.net/$schemagroups/<SchemaGroup_Name>/schemas/<Schema_Name>?api-version=2020-09-01-preview'

#Step 4- These headers would be sent along with the API Call
$headers = @{
"Content-Type" = "application/atom+xml;type=entry;charset=utf-8"
"Serialization-Type" = "Avro"
"Authorization" = "Bearer " + $response.access_token
}

#Step 5- This step shows the final call that we make to add schema under the schema groups,
Invoke-RestMethod -Method "PUT" -Uri $uri -Headers $headers -Body $Body -ContentType "application/json"
44 changes: 44 additions & 0 deletions samples/Management/PowerShell/AddingSchematoSchemagroups/ReadMe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Addition of Schema under Schema groups

With release of [Schema registry](https://docs.microsoft.com/en-us/azure/event-hubs/schema-registry-overview#what-is-azure-schema-registry) feature in Event Hubs, it becomes easier to store different kinds of schemas under schema groups and have seamless interaction between producer and consumer application. Since addition of schema under schema groups is a data plane operation ( not intended to hit management endpoint) hence, there is no publicly available PS Cmdlet to abstract this functionality.

This sample is meant to serve as reference code for adding schemas under schema groups using PowerShell.

# Prerequisites

Please ensure that following steps are followed before following the sample code:

1. Updated PS module in Windows machine or you could use Azure CloudShell via https://shell.azure.com

2. Create AD application for authentication,here are additional details: https://docs.microsoft.com/en-us/azure/active-directory/develop/howto-create-service-principal-portal
3. Please keep a note of Application ID, secret that you had created in last step ( you would be using this in PS sample)
4. Assign the service principal Schema registry contributor role (To know more about how to assign a role: https://docs.microsoft.com/en-us/azure/role-based-access-control/role-assignments-portal?tabs=current ), so that it could make changes to schema groups. Here is quick read about Schema registry contributor role and permissions it posseses : https://docs.microsoft.com/en-us/azure/role-based-access-control/built-in-roles#schema-registry-contributor-preview
5. Finally, update the following placeholders in sample code with information associated to your environment:
- Application_ID: Application ID of AD Application
- Application_Secret: Secret value associated to Application
- resource: needs to be set as "https://eventhubs.azure.net", since we are authenticating against data endpoint
- Tenant_Id: Tenant ID of Associated AD tenant
- Namespace_Name: Name of Event Hubs namespace
- SchemaGroup_Name: Name of schema groups under event hub namespace
- Schema_Name: Name of schema to be added under Schema group

# Script Overview

This PS sample can be spliced into two REST calls that are being made.

1. Once we have the AD application details as talked above, we would make first API call to fetch the authorization token needed to successfully make schema addition call.
2. After fetching and formatting the bearer token, we trigger another API call to add schema under schema groups. Once this code runs successfully, you should be able to find the newly added schema under schema groups on Azure Portal.

# Additional Reference:

Here are some additional reference links that could be helpful:

- Schema Registry in Event Hubs - https://docs.microsoft.com/en-us/azure/event-hubs/schema-registry-overview
- Event hubs Overview- https://docs.microsoft.com/en-us/azure/event-hubs/

# Conclusion

We would love to hear about your feedback about this sample. We would be happy to see any pull requests if in case you are interested to contribute to our community.

Stay tuned for future updates from Azure Messaging team. Happy scripting!