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

[QUERY] EventGrid NameSpaceTopicEventSubscriptionData-> FilterConfiguration #47718

Open
mcash95 opened this issue Jan 6, 2025 · 4 comments
Open
Assignees
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. Event Grid Mgmt This issue is related to a management-plane library. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that

Comments

@mcash95
Copy link

mcash95 commented Jan 6, 2025

Library name and version

Azure.ResourceManager.EventGrid v1.1.0-beta.5

Query/Question

I am attempting to create a Subscription from an azure function as part of a registration process. I've been able to accomplish all portions leading up to creating a filter for the newly created subscription (the subscription creates with no filters just fine), I am unable to find any way to create a new instance of a FiltersConfiguration, or any derived class. Could someone point me in the right direction? Small code snip below for reference

NamespaceTopicEventSubscriptionData subscriptionData = new()
{
  EventDeliverySchema = DeliverySchema.CloudEventSchemaV10,
  DeliveryConfiguration = new DeliveryConfiguration()
  {
      DeliveryMode = DeliveryMode.Queue,
      Queue = new()
      {
          ReceiveLockDurationInSeconds = 60,
          MaxDeliveryCount = 10,
          EventTimeToLive = TimeSpan.FromDays(7),
          DeadLetterDestinationWithResourceIdentity = new()
          {
              DeadLetterDestination = new StorageBlobDeadLetterDestination()
              {
                  ResourceId = subscription.GetStorageAccounts().Where(x => x.Data.Name == "tmailstorage").First().Id,
                  BlobContainerName = "deadlettered",
              },
              Identity = new()
              {
                  IdentityType = EventSubscriptionIdentityType.SystemAssigned,
              }
          },
      }
  },
  //Below is the problem line.
  FiltersConfiguration = new()
};

Thank you in advance!

Environment

Visual Studio Version : 17.12.2
Project target framework: .Net 8.0
Project Type : Azure Function (running locally for testing)

@github-actions github-actions bot added customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Jan 6, 2025
@jsquire jsquire added Event Grid Mgmt This issue is related to a management-plane library. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team and removed needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. labels Jan 6, 2025
@jsquire
Copy link
Member

jsquire commented Jan 6, 2025

Thank you for your feedback. Tagging and routing to the team member best able to assist.

@HarveyLink HarveyLink assigned HarveyLink and unassigned ArthurMa1978 Jan 7, 2025
@HarveyLink
Copy link
Member

Hi @mcash95 , Thank you for using Azure SDK for .NET.
For your question, the FilterConfiguration could be added inside the subscriptionData

NamespaceTopicEventSubscriptionData subscriptionData = new()
{
    FiltersConfiguration = new FiltersConfiguration()
    {},
    DeliveryConfiguration = new DeliveryConfiguration()
    {}
}

Feel free to let us know if additional details are required.

@HarveyLink HarveyLink added the issue-addressed Workflow: The Azure SDK team believes it to be addressed and ready to close. label Jan 8, 2025
@github-actions github-actions bot removed the needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team label Jan 8, 2025
Copy link

github-actions bot commented Jan 8, 2025

Hi @mcash95. Thank you for opening this issue and giving us the opportunity to assist. We believe that this has been addressed. If you feel that further discussion is needed, please add a comment with the text "/unresolve" to remove the "issue-addressed" label and continue the conversation.

@mcash95
Copy link
Author

mcash95 commented Jan 8, 2025

/unresolve

Yes that much i am aware of. The issue that presents is that FiltersConfiguration() properties are readonly, i am unable to assign an actual filter to the Subscription Data. How do i go about adding filters to the FiltersConfiguration object?Image

@github-actions github-actions bot added needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team and removed issue-addressed Workflow: The Azure SDK team believes it to be addressed and ready to close. labels Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. Event Grid Mgmt This issue is related to a management-plane library. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
None yet
Development

No branches or pull requests

4 participants