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

[FEATURE REQ] Provide a method to consume Service Health Active Events #44060

Open
jsarrelli opened this issue Feb 6, 2025 · 5 comments
Open
Assignees
Labels
ARM customer-reported Issues that are reported by GitHub users external to the Azure organization. issue-addressed Workflow: The Azure SDK team believes it to be addressed and ready to close. Mgmt This issue is related to a management-plane library. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that

Comments

@jsarrelli
Copy link

jsarrelli commented Feb 6, 2025

Hi team!

It would be awesome if you can include a method on the Resource Health library to consume Service Health events. Currently, the only way of doing it is through the API Docs

Image

Library: "com.azure.resourcemanager" % "azure-resourcemanager-resourcehealth" % "1.0.0"

Something like:

import com.azure.identity.DefaultAzureCredentialBuilder;
import com.azure.resourcemanager.resourcehealth.ResourceHealthManager;
import com.azure.resourcemanager.resourcehealth.models.Event;

public class ServiceHealthExample {
    public static void main(String[] args) {
        String subscriptionId = "<your-subscription-id>";
        ResourceHealthManager resourceHealthManager = ResourceHealthManager
            .authenticate(new DefaultAzureCredentialBuilder().build(), subscriptionId);

        PagedIterable<Event> events = resourceHealthManager.events().listBySubscriptionId();

        for (Event event : events) {
            System.out.println("Event ID: " + event.id());
            System.out.println("Event Title: " + event.eventTitle());
            System.out.println("Impact Start Time: " + event.impactStartTime());
            System.out.println("Impact End Time: " + event.impactEndTime());
            System.out.println("Status: " + event.status());
            System.out.println("===================================");
        }
    }
}

Thanks in advance!!

@github-actions github-actions bot added ARM customer-reported Issues that are reported by GitHub users external to the Azure organization. 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 labels Feb 6, 2025
Copy link

github-actions bot commented Feb 6, 2025

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

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

Hi @jsarrelli. 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.

@jsarrelli
Copy link
Author

jsarrelli commented Feb 13, 2025

Thank you @weidongxu-microsoft ! I've just implemented it and it's working great so far!

It would be awesome for the future to have it Async.

Thanks!!

@weidongxu-microsoft
Copy link
Member

For Async, do you mean PagedFlux<Event> listAsync?

There was a long discussion about whether Azure SDK should depend on Reactor lib for async support. Currently the inclination is no, hence we didn't expose async API in the lib.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ARM customer-reported Issues that are reported by GitHub users external to the Azure organization. issue-addressed Workflow: The Azure SDK team believes it to be addressed and ready to close. Mgmt This issue is related to a management-plane library. 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

2 participants