Skip to content
This repository has been archived by the owner on Dec 6, 2023. It is now read-only.

added preview examples #153

Merged
merged 26 commits into from Dec 10, 2018
Merged

added preview examples #153

merged 26 commits into from Dec 10, 2018

Conversation

tfitzmac
Copy link
Contributor

@tfitzmac tfitzmac commented Nov 8, 2018

No description provided.

@tfitzmac
Copy link
Contributor Author

tfitzmac commented Nov 8, 2018

#sign-off

@tfitzmac
Copy link
Contributor Author

tfitzmac commented Nov 9, 2018

@sptramer - if this PR could be merged, that would be much appreciated.

@tfitzmac
Copy link
Contributor Author

@erickson-doug or @sptramer - can you merge this PR?

@sptramer sptramer self-requested a review November 15, 2018 18:59
@sptramer sptramer self-assigned this Nov 15, 2018
Copy link
Contributor

@sptramer sptramer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR requests changes to make the sample scripts operational.

@tfitzmac
Copy link
Contributor Author

@sptramer - thanks for the feedback. I have made the suggested changes.

Copy link
Contributor

@sptramer sptramer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some other changes required for scripts to work correctly.

@tfitzmac
Copy link
Contributor Author

tfitzmac commented Dec 6, 2018

@sptramer - I think I have everything fixed now.

@sptramer
Copy link
Contributor

sptramer commented Dec 6, 2018

Get the following error from subscribe-to-azure-subscription:

New-AzureRmEventGridSubscription : Invalid event subscription request: endpoint.
At line:9 char:1
+ New-AzureRmEventGridSubscription -Endpoint $myEndpoint -EventSubscrip ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : CloseError: (:) [New-AzureRmEventGridSubscription], CloudException
    + FullyQualifiedErrorId : Microsoft.Azure.Commands.EventGrid.NewAzureEventGridSubscription

Not clear why I have this error. The provided subscription information was valid. Endpoints are validated by an API call which will report a timeout/fail if they're not correct (no correct endpoints were used in testing, because I have no idea how to set them up.)


subscribe-to-azure-subscription-preview contains an error where the subscription ID is incorrectly used.

New-AzureRmEventGridSubscription -ResourceId "/subscriptions/$subID" -Endpoint $myEndpoint -EventSubscriptionName demoSubscriptionToAzureSub
WARNING: Unable to acquire token for tenant '0f9e0cd4-2a9d-4da6-9cea-da263ee7f6a3'
Get-AzureRmSubscription : Subscription 07a45d58-11b5-4fd3-8cb6-12ac232d1c3f was not found in tenant . Please verify that the subscription exists in this tenant.
At line:9 char:11
+ $subID = (Get-AzureRmSubscription -SubscriptionName "07a45d58-11b5-4f ...
+           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : CloseError: (:) [Get-AzureRmSubscription], PSArgumentException
    + FullyQualifiedErrorId : Microsoft.Azure.Commands.Profile.GetAzureRMSubscriptionCommand

@sptramer
Copy link
Contributor

sptramer commented Dec 6, 2018

Please make sure that you run and validate the scripts before signing off again.

@tfitzmac
Copy link
Contributor Author

tfitzmac commented Dec 7, 2018

@sptramer - sorry about the errors. I have rerun all of the scripts and they are now working as expected. The subscription errors you are seeing are probably related to not having a valid endpoint, and not having a token for the subscription. Event Grid requires a response from the endpoint. Also, you need event write access for the Azure subscription you provide.

@sptramer
Copy link
Contributor

sptramer commented Dec 7, 2018

@tfitzmac Is there an easy way to set up an endpoint so that I can use it in testing to avoid errors like those?

@tfitzmac
Copy link
Contributor Author

tfitzmac commented Dec 7, 2018

@sptramer - the easiest way is to deploy a pre-built event viewer web app.

Note that you have to add "/api/updates" to the base URL when subscribing to events. That path is set up to process event subscription requests.

Copy link
Contributor

@sptramer sptramer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking changes requested, let me know if you just want me to merge.

@tfitzmac
Copy link
Contributor Author

Comments were changed

@sptramer sptramer merged commit 7adb5e6 into Azure:master Dec 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants