Service Health v1 API - Class ServiceHealthClient (1.1.0)

public abstract class ServiceHealthClient

Reference documentation and code samples for the Service Health v1 API class ServiceHealthClient.

ServiceHealth client wrapper, for convenient use.

Inheritance

object > ServiceHealthClient

Derived Types

Namespace

Google.Cloud.ServiceHealth.V1

Assembly

Google.Cloud.ServiceHealth.V1.dll

Remarks

Request service health events relevant to your Google Cloud project.

Properties

DefaultEndpoint

public static string DefaultEndpoint { get; }

The default endpoint for the ServiceHealth service, which is a host of "servicehealth.googleapis.com" and a port of 443.

Property Value
TypeDescription
string

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default ServiceHealth scopes.

Property Value
TypeDescription
IReadOnlyListstring
Remarks

The default ServiceHealth scopes are:

GrpcClient

public virtual ServiceHealth.ServiceHealthClient GrpcClient { get; }

The underlying gRPC ServiceHealth client

Property Value
TypeDescription
ServiceHealthServiceHealthClient

LocationsClient

public virtual LocationsClient LocationsClient { get; }

The LocationsClient associated with this client.

Property Value
TypeDescription
LocationsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
TypeDescription
ServiceMetadata

Methods

Create()

public static ServiceHealthClient Create()

Synchronously creates a ServiceHealthClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use ServiceHealthClientBuilder.

Returns
TypeDescription
ServiceHealthClient

The created ServiceHealthClient.

CreateAsync(CancellationToken)

public static Task<ServiceHealthClient> CreateAsync(CancellationToken cancellationToken = default)

Asynchronously creates a ServiceHealthClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use ServiceHealthClientBuilder.

Parameter
NameDescription
cancellationTokenCancellationToken

The CancellationToken to use while creating the client.

Returns
TypeDescription
TaskServiceHealthClient

The task representing the created ServiceHealthClient.

GetEvent(EventName, CallSettings)

public virtual Event GetEvent(EventName name, CallSettings callSettings = null)

Retrieves a resource containing information about an event.

Parameters
NameDescription
nameEventName

Required. Unique name of the event in this scope including project and location using the form projects/{project_id}/locations/{location}/events/{event_id}.

project_id - Project ID of the project that contains the event. <br> location - The location to get the service health events from. <br> event_id - Event ID to retrieve.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Event

The RPC response.

Example
// Create client
ServiceHealthClient serviceHealthClient = ServiceHealthClient.Create();
// Initialize request argument(s)
EventName name = EventName.FromProjectLocationEvent("[PROJECT]", "[LOCATION]", "[EVENT]");
// Make the request
Event response = serviceHealthClient.GetEvent(name);

GetEvent(GetEventRequest, CallSettings)

public virtual Event GetEvent(GetEventRequest request, CallSettings callSettings = null)

Retrieves a resource containing information about an event.

Parameters
NameDescription
requestGetEventRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Event

The RPC response.

Example
// Create client
ServiceHealthClient serviceHealthClient = ServiceHealthClient.Create();
// Initialize request argument(s)
GetEventRequest request = new GetEventRequest
{
    EventName = EventName.FromProjectLocationEvent("[PROJECT]", "[LOCATION]", "[EVENT]"),
};
// Make the request
Event response = serviceHealthClient.GetEvent(request);

GetEvent(string, CallSettings)

public virtual Event GetEvent(string name, CallSettings callSettings = null)

Retrieves a resource containing information about an event.

Parameters
NameDescription
namestring

Required. Unique name of the event in this scope including project and location using the form projects/{project_id}/locations/{location}/events/{event_id}.

project_id - Project ID of the project that contains the event. <br> location - The location to get the service health events from. <br> event_id - Event ID to retrieve.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Event

The RPC response.

Example
// Create client
ServiceHealthClient serviceHealthClient = ServiceHealthClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/events/[EVENT]";
// Make the request
Event response = serviceHealthClient.GetEvent(name);

GetEventAsync(EventName, CallSettings)

public virtual Task<Event> GetEventAsync(EventName name, CallSettings callSettings = null)

Retrieves a resource containing information about an event.

Parameters
NameDescription
nameEventName

Required. Unique name of the event in this scope including project and location using the form projects/{project_id}/locations/{location}/events/{event_id}.

project_id - Project ID of the project that contains the event. <br> location - The location to get the service health events from. <br> event_id - Event ID to retrieve.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskEvent

A Task containing the RPC response.

Example
// Create client
ServiceHealthClient serviceHealthClient = await ServiceHealthClient.CreateAsync();
// Initialize request argument(s)
EventName name = EventName.FromProjectLocationEvent("[PROJECT]", "[LOCATION]", "[EVENT]");
// Make the request
Event response = await serviceHealthClient.GetEventAsync(name);

GetEventAsync(EventName, CancellationToken)

public virtual Task<Event> GetEventAsync(EventName name, CancellationToken cancellationToken)

Retrieves a resource containing information about an event.

Parameters
NameDescription
nameEventName

Required. Unique name of the event in this scope including project and location using the form projects/{project_id}/locations/{location}/events/{event_id}.

project_id - Project ID of the project that contains the event. <br> location - The location to get the service health events from. <br> event_id - Event ID to retrieve.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskEvent

A Task containing the RPC response.

Example
// Create client
ServiceHealthClient serviceHealthClient = await ServiceHealthClient.CreateAsync();
// Initialize request argument(s)
EventName name = EventName.FromProjectLocationEvent("[PROJECT]", "[LOCATION]", "[EVENT]");
// Make the request
Event response = await serviceHealthClient.GetEventAsync(name);

GetEventAsync(GetEventRequest, CallSettings)

public virtual Task<Event> GetEventAsync(GetEventRequest request, CallSettings callSettings = null)

Retrieves a resource containing information about an event.

Parameters
NameDescription
requestGetEventRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskEvent

A Task containing the RPC response.

Example
// Create client
ServiceHealthClient serviceHealthClient = await ServiceHealthClient.CreateAsync();
// Initialize request argument(s)
GetEventRequest request = new GetEventRequest
{
    EventName = EventName.FromProjectLocationEvent("[PROJECT]", "[LOCATION]", "[EVENT]"),
};
// Make the request
Event response = await serviceHealthClient.GetEventAsync(request);

GetEventAsync(GetEventRequest, CancellationToken)

public virtual Task<Event> GetEventAsync(GetEventRequest request, CancellationToken cancellationToken)

Retrieves a resource containing information about an event.

Parameters
NameDescription
requestGetEventRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskEvent

A Task containing the RPC response.

Example
// Create client
ServiceHealthClient serviceHealthClient = await ServiceHealthClient.CreateAsync();
// Initialize request argument(s)
GetEventRequest request = new GetEventRequest
{
    EventName = EventName.FromProjectLocationEvent("[PROJECT]", "[LOCATION]", "[EVENT]"),
};
// Make the request
Event response = await serviceHealthClient.GetEventAsync(request);

GetEventAsync(string, CallSettings)

public virtual Task<Event> GetEventAsync(string name, CallSettings callSettings = null)

Retrieves a resource containing information about an event.

Parameters
NameDescription
namestring

Required. Unique name of the event in this scope including project and location using the form projects/{project_id}/locations/{location}/events/{event_id}.

project_id - Project ID of the project that contains the event. <br> location - The location to get the service health events from. <br> event_id - Event ID to retrieve.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskEvent

A Task containing the RPC response.

Example
// Create client
ServiceHealthClient serviceHealthClient = await ServiceHealthClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/events/[EVENT]";
// Make the request
Event response = await serviceHealthClient.GetEventAsync(name);

GetEventAsync(string, CancellationToken)

public virtual Task<Event> GetEventAsync(string name, CancellationToken cancellationToken)

Retrieves a resource containing information about an event.

Parameters
NameDescription
namestring

Required. Unique name of the event in this scope including project and location using the form projects/{project_id}/locations/{location}/events/{event_id}.

project_id - Project ID of the project that contains the event. <br> location - The location to get the service health events from. <br> event_id - Event ID to retrieve.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskEvent

A Task containing the RPC response.

Example
// Create client
ServiceHealthClient serviceHealthClient = await ServiceHealthClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/events/[EVENT]";
// Make the request
Event response = await serviceHealthClient.GetEventAsync(name);

GetOrganizationEvent(GetOrganizationEventRequest, CallSettings)

public virtual OrganizationEvent GetOrganizationEvent(GetOrganizationEventRequest request, CallSettings callSettings = null)

Retrieves a resource containing information about an event affecting an organization .

Parameters
NameDescription
requestGetOrganizationEventRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OrganizationEvent

The RPC response.

Example
// Create client
ServiceHealthClient serviceHealthClient = ServiceHealthClient.Create();
// Initialize request argument(s)
GetOrganizationEventRequest request = new GetOrganizationEventRequest
{
    OrganizationEventName = OrganizationEventName.FromOrganizationLocationEvent("[ORGANIZATION]", "[LOCATION]", "[EVENT]"),
};
// Make the request
OrganizationEvent response = serviceHealthClient.GetOrganizationEvent(request);

GetOrganizationEvent(OrganizationEventName, CallSettings)

public virtual OrganizationEvent GetOrganizationEvent(OrganizationEventName name, CallSettings callSettings = null)

Retrieves a resource containing information about an event affecting an organization .

Parameters
NameDescription
nameOrganizationEventName

Required. Unique name of the event in this scope including organization and event ID using the form organizations/{organization_id}/locations/locations/global/organizationEvents/{event_id}.

organization_id - ID (number) of the project that contains the event. To get your organization_id, see Getting your organization resource ID.<br> event_id - Organization event ID to retrieve.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OrganizationEvent

The RPC response.

Example
// Create client
ServiceHealthClient serviceHealthClient = ServiceHealthClient.Create();
// Initialize request argument(s)
OrganizationEventName name = OrganizationEventName.FromOrganizationLocationEvent("[ORGANIZATION]", "[LOCATION]", "[EVENT]");
// Make the request
OrganizationEvent response = serviceHealthClient.GetOrganizationEvent(name);

GetOrganizationEvent(string, CallSettings)

public virtual OrganizationEvent GetOrganizationEvent(string name, CallSettings callSettings = null)

Retrieves a resource containing information about an event affecting an organization .

Parameters
NameDescription
namestring

Required. Unique name of the event in this scope including organization and event ID using the form organizations/{organization_id}/locations/locations/global/organizationEvents/{event_id}.

organization_id - ID (number) of the project that contains the event. To get your organization_id, see Getting your organization resource ID.<br> event_id - Organization event ID to retrieve.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OrganizationEvent

The RPC response.

Example
// Create client
ServiceHealthClient serviceHealthClient = ServiceHealthClient.Create();
// Initialize request argument(s)
string name = "organizations/[ORGANIZATION]/locations/[LOCATION]/organizationEvents/[EVENT]";
// Make the request
OrganizationEvent response = serviceHealthClient.GetOrganizationEvent(name);

GetOrganizationEventAsync(GetOrganizationEventRequest, CallSettings)

public virtual Task<OrganizationEvent> GetOrganizationEventAsync(GetOrganizationEventRequest request, CallSettings callSettings = null)

Retrieves a resource containing information about an event affecting an organization .

Parameters
NameDescription
requestGetOrganizationEventRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOrganizationEvent

A Task containing the RPC response.

Example
// Create client
ServiceHealthClient serviceHealthClient = await ServiceHealthClient.CreateAsync();
// Initialize request argument(s)
GetOrganizationEventRequest request = new GetOrganizationEventRequest
{
    OrganizationEventName = OrganizationEventName.FromOrganizationLocationEvent("[ORGANIZATION]", "[LOCATION]", "[EVENT]"),
};
// Make the request
OrganizationEvent response = await serviceHealthClient.GetOrganizationEventAsync(request);

GetOrganizationEventAsync(GetOrganizationEventRequest, CancellationToken)

public virtual Task<OrganizationEvent> GetOrganizationEventAsync(GetOrganizationEventRequest request, CancellationToken cancellationToken)

Retrieves a resource containing information about an event affecting an organization .

Parameters
NameDescription
requestGetOrganizationEventRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOrganizationEvent

A Task containing the RPC response.

Example
// Create client
ServiceHealthClient serviceHealthClient = await ServiceHealthClient.CreateAsync();
// Initialize request argument(s)
GetOrganizationEventRequest request = new GetOrganizationEventRequest
{
    OrganizationEventName = OrganizationEventName.FromOrganizationLocationEvent("[ORGANIZATION]", "[LOCATION]", "[EVENT]"),
};
// Make the request
OrganizationEvent response = await serviceHealthClient.GetOrganizationEventAsync(request);

GetOrganizationEventAsync(OrganizationEventName, CallSettings)

public virtual Task<OrganizationEvent> GetOrganizationEventAsync(OrganizationEventName name, CallSettings callSettings = null)

Retrieves a resource containing information about an event affecting an organization .

Parameters
NameDescription
nameOrganizationEventName

Required. Unique name of the event in this scope including organization and event ID using the form organizations/{organization_id}/locations/locations/global/organizationEvents/{event_id}.

organization_id - ID (number) of the project that contains the event. To get your organization_id, see Getting your organization resource ID.<br> event_id - Organization event ID to retrieve.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOrganizationEvent

A Task containing the RPC response.

Example
// Create client
ServiceHealthClient serviceHealthClient = await ServiceHealthClient.CreateAsync();
// Initialize request argument(s)
OrganizationEventName name = OrganizationEventName.FromOrganizationLocationEvent("[ORGANIZATION]", "[LOCATION]", "[EVENT]");
// Make the request
OrganizationEvent response = await serviceHealthClient.GetOrganizationEventAsync(name);

GetOrganizationEventAsync(OrganizationEventName, CancellationToken)

public virtual Task<OrganizationEvent> GetOrganizationEventAsync(OrganizationEventName name, CancellationToken cancellationToken)

Retrieves a resource containing information about an event affecting an organization .

Parameters
NameDescription
nameOrganizationEventName

Required. Unique name of the event in this scope including organization and event ID using the form organizations/{organization_id}/locations/locations/global/organizationEvents/{event_id}.

organization_id - ID (number) of the project that contains the event. To get your organization_id, see Getting your organization resource ID.<br> event_id - Organization event ID to retrieve.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOrganizationEvent

A Task containing the RPC response.

Example
// Create client
ServiceHealthClient serviceHealthClient = await ServiceHealthClient.CreateAsync();
// Initialize request argument(s)
OrganizationEventName name = OrganizationEventName.FromOrganizationLocationEvent("[ORGANIZATION]", "[LOCATION]", "[EVENT]");
// Make the request
OrganizationEvent response = await serviceHealthClient.GetOrganizationEventAsync(name);

GetOrganizationEventAsync(string, CallSettings)

public virtual Task<OrganizationEvent> GetOrganizationEventAsync(string name, CallSettings callSettings = null)

Retrieves a resource containing information about an event affecting an organization .

Parameters
NameDescription
namestring

Required. Unique name of the event in this scope including organization and event ID using the form organizations/{organization_id}/locations/locations/global/organizationEvents/{event_id}.

organization_id - ID (number) of the project that contains the event. To get your organization_id, see Getting your organization resource ID.<br> event_id - Organization event ID to retrieve.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOrganizationEvent

A Task containing the RPC response.

Example
// Create client
ServiceHealthClient serviceHealthClient = await ServiceHealthClient.CreateAsync();
// Initialize request argument(s)
string name = "organizations/[ORGANIZATION]/locations/[LOCATION]/organizationEvents/[EVENT]";
// Make the request
OrganizationEvent response = await serviceHealthClient.GetOrganizationEventAsync(name);

GetOrganizationEventAsync(string, CancellationToken)

public virtual Task<OrganizationEvent> GetOrganizationEventAsync(string name, CancellationToken cancellationToken)

Retrieves a resource containing information about an event affecting an organization .

Parameters
NameDescription
namestring

Required. Unique name of the event in this scope including organization and event ID using the form organizations/{organization_id}/locations/locations/global/organizationEvents/{event_id}.

organization_id - ID (number) of the project that contains the event. To get your organization_id, see Getting your organization resource ID.<br> event_id - Organization event ID to retrieve.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOrganizationEvent

A Task containing the RPC response.

Example
// Create client
ServiceHealthClient serviceHealthClient = await ServiceHealthClient.CreateAsync();
// Initialize request argument(s)
string name = "organizations/[ORGANIZATION]/locations/[LOCATION]/organizationEvents/[EVENT]";
// Make the request
OrganizationEvent response = await serviceHealthClient.GetOrganizationEventAsync(name);

GetOrganizationImpact(GetOrganizationImpactRequest, CallSettings)

public virtual OrganizationImpact GetOrganizationImpact(GetOrganizationImpactRequest request, CallSettings callSettings = null)

Retrieves a resource containing information about impact to an asset under an organization affected by a service health event.

Parameters
NameDescription
requestGetOrganizationImpactRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OrganizationImpact

The RPC response.

Example
// Create client
ServiceHealthClient serviceHealthClient = ServiceHealthClient.Create();
// Initialize request argument(s)
GetOrganizationImpactRequest request = new GetOrganizationImpactRequest
{
    OrganizationImpactName = OrganizationImpactName.FromOrganizationLocationOrganizationImpact("[ORGANIZATION]", "[LOCATION]", "[ORGANIZATION_IMPACT]"),
};
// Make the request
OrganizationImpact response = serviceHealthClient.GetOrganizationImpact(request);

GetOrganizationImpact(OrganizationImpactName, CallSettings)

public virtual OrganizationImpact GetOrganizationImpact(OrganizationImpactName name, CallSettings callSettings = null)

Retrieves a resource containing information about impact to an asset under an organization affected by a service health event.

Parameters
NameDescription
nameOrganizationImpactName

Required. Name of the resource using the form organizations/{organization_id}/locations/global/organizationImpacts/{organization_impact_id}.

organization_id - ID (number) of the organization that contains the event. To get your organization_id, see Getting your organization resource ID.<br> organization_impact_id - ID of the OrganizationImpact resource.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OrganizationImpact

The RPC response.

Example
// Create client
ServiceHealthClient serviceHealthClient = ServiceHealthClient.Create();
// Initialize request argument(s)
OrganizationImpactName name = OrganizationImpactName.FromOrganizationLocationOrganizationImpact("[ORGANIZATION]", "[LOCATION]", "[ORGANIZATION_IMPACT]");
// Make the request
OrganizationImpact response = serviceHealthClient.GetOrganizationImpact(name);

GetOrganizationImpact(string, CallSettings)

public virtual OrganizationImpact GetOrganizationImpact(string name, CallSettings callSettings = null)

Retrieves a resource containing information about impact to an asset under an organization affected by a service health event.

Parameters
NameDescription
namestring

Required. Name of the resource using the form organizations/{organization_id}/locations/global/organizationImpacts/{organization_impact_id}.

organization_id - ID (number) of the organization that contains the event. To get your organization_id, see Getting your organization resource ID.<br> organization_impact_id - ID of the OrganizationImpact resource.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OrganizationImpact

The RPC response.

Example
// Create client
ServiceHealthClient serviceHealthClient = ServiceHealthClient.Create();
// Initialize request argument(s)
string name = "organizations/[ORGANIZATION]/locations/[LOCATION]/organizationImpacts/[ORGANIZATION_IMPACT]";
// Make the request
OrganizationImpact response = serviceHealthClient.GetOrganizationImpact(name);

GetOrganizationImpactAsync(GetOrganizationImpactRequest, CallSettings)

public virtual Task<OrganizationImpact> GetOrganizationImpactAsync(GetOrganizationImpactRequest request, CallSettings callSettings = null)

Retrieves a resource containing information about impact to an asset under an organization affected by a service health event.

Parameters
NameDescription
requestGetOrganizationImpactRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOrganizationImpact

A Task containing the RPC response.

Example
// Create client
ServiceHealthClient serviceHealthClient = await ServiceHealthClient.CreateAsync();
// Initialize request argument(s)
GetOrganizationImpactRequest request = new GetOrganizationImpactRequest
{
    OrganizationImpactName = OrganizationImpactName.FromOrganizationLocationOrganizationImpact("[ORGANIZATION]", "[LOCATION]", "[ORGANIZATION_IMPACT]"),
};
// Make the request
OrganizationImpact response = await serviceHealthClient.GetOrganizationImpactAsync(request);

GetOrganizationImpactAsync(GetOrganizationImpactRequest, CancellationToken)

public virtual Task<OrganizationImpact> GetOrganizationImpactAsync(GetOrganizationImpactRequest request, CancellationToken cancellationToken)

Retrieves a resource containing information about impact to an asset under an organization affected by a service health event.

Parameters
NameDescription
requestGetOrganizationImpactRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOrganizationImpact

A Task containing the RPC response.

Example
// Create client
ServiceHealthClient serviceHealthClient = await ServiceHealthClient.CreateAsync();
// Initialize request argument(s)
GetOrganizationImpactRequest request = new GetOrganizationImpactRequest
{
    OrganizationImpactName = OrganizationImpactName.FromOrganizationLocationOrganizationImpact("[ORGANIZATION]", "[LOCATION]", "[ORGANIZATION_IMPACT]"),
};
// Make the request
OrganizationImpact response = await serviceHealthClient.GetOrganizationImpactAsync(request);

GetOrganizationImpactAsync(OrganizationImpactName, CallSettings)

public virtual Task<OrganizationImpact> GetOrganizationImpactAsync(OrganizationImpactName name, CallSettings callSettings = null)

Retrieves a resource containing information about impact to an asset under an organization affected by a service health event.

Parameters
NameDescription
nameOrganizationImpactName

Required. Name of the resource using the form organizations/{organization_id}/locations/global/organizationImpacts/{organization_impact_id}.

organization_id - ID (number) of the organization that contains the event. To get your organization_id, see Getting your organization resource ID.<br> organization_impact_id - ID of the OrganizationImpact resource.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOrganizationImpact

A Task containing the RPC response.

Example
// Create client
ServiceHealthClient serviceHealthClient = await ServiceHealthClient.CreateAsync();
// Initialize request argument(s)
OrganizationImpactName name = OrganizationImpactName.FromOrganizationLocationOrganizationImpact("[ORGANIZATION]", "[LOCATION]", "[ORGANIZATION_IMPACT]");
// Make the request
OrganizationImpact response = await serviceHealthClient.GetOrganizationImpactAsync(name);

GetOrganizationImpactAsync(OrganizationImpactName, CancellationToken)

public virtual Task<OrganizationImpact> GetOrganizationImpactAsync(OrganizationImpactName name, CancellationToken cancellationToken)

Retrieves a resource containing information about impact to an asset under an organization affected by a service health event.

Parameters
NameDescription
nameOrganizationImpactName

Required. Name of the resource using the form organizations/{organization_id}/locations/global/organizationImpacts/{organization_impact_id}.

organization_id - ID (number) of the organization that contains the event. To get your organization_id, see Getting your organization resource ID.<br> organization_impact_id - ID of the OrganizationImpact resource.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOrganizationImpact

A Task containing the RPC response.

Example
// Create client
ServiceHealthClient serviceHealthClient = await ServiceHealthClient.CreateAsync();
// Initialize request argument(s)
OrganizationImpactName name = OrganizationImpactName.FromOrganizationLocationOrganizationImpact("[ORGANIZATION]", "[LOCATION]", "[ORGANIZATION_IMPACT]");
// Make the request
OrganizationImpact response = await serviceHealthClient.GetOrganizationImpactAsync(name);

GetOrganizationImpactAsync(string, CallSettings)

public virtual Task<OrganizationImpact> GetOrganizationImpactAsync(string name, CallSettings callSettings = null)

Retrieves a resource containing information about impact to an asset under an organization affected by a service health event.

Parameters
NameDescription
namestring

Required. Name of the resource using the form organizations/{organization_id}/locations/global/organizationImpacts/{organization_impact_id}.

organization_id - ID (number) of the organization that contains the event. To get your organization_id, see Getting your organization resource ID.<br> organization_impact_id - ID of the OrganizationImpact resource.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOrganizationImpact

A Task containing the RPC response.

Example
// Create client
ServiceHealthClient serviceHealthClient = await ServiceHealthClient.CreateAsync();
// Initialize request argument(s)
string name = "organizations/[ORGANIZATION]/locations/[LOCATION]/organizationImpacts/[ORGANIZATION_IMPACT]";
// Make the request
OrganizationImpact response = await serviceHealthClient.GetOrganizationImpactAsync(name);

GetOrganizationImpactAsync(string, CancellationToken)

public virtual Task<OrganizationImpact> GetOrganizationImpactAsync(string name, CancellationToken cancellationToken)

Retrieves a resource containing information about impact to an asset under an organization affected by a service health event.

Parameters
NameDescription
namestring

Required. Name of the resource using the form organizations/{organization_id}/locations/global/organizationImpacts/{organization_impact_id}.

organization_id - ID (number) of the organization that contains the event. To get your organization_id, see Getting your organization resource ID.<br> organization_impact_id - ID of the OrganizationImpact resource.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOrganizationImpact

A Task containing the RPC response.

Example
// Create client
ServiceHealthClient serviceHealthClient = await ServiceHealthClient.CreateAsync();
// Initialize request argument(s)
string name = "organizations/[ORGANIZATION]/locations/[LOCATION]/organizationImpacts/[ORGANIZATION_IMPACT]";
// Make the request
OrganizationImpact response = await serviceHealthClient.GetOrganizationImpactAsync(name);

ListEvents(LocationName, string, int?, CallSettings)

public virtual PagedEnumerable<ListEventsResponse, Event> ListEvents(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists events under a given project and location.

Parameters
NameDescription
parentLocationName

Required. Parent value using the form projects/{project_id}/locations/{location}/events.

project_id - ID of the project for which to list service health events. location - The location to get the service health events from. To retrieve service health events of category = INCIDENT, use location = global.

pageTokenstring

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListEventsResponseEvent

A pageable sequence of Event resources.

Example
// Create client
ServiceHealthClient serviceHealthClient = ServiceHealthClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<ListEventsResponse, Event> response = serviceHealthClient.ListEvents(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (Event item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListEventsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Event item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Event> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Event item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListEvents(ListEventsRequest, CallSettings)

public virtual PagedEnumerable<ListEventsResponse, Event> ListEvents(ListEventsRequest request, CallSettings callSettings = null)

Lists events under a given project and location.

Parameters
NameDescription
requestListEventsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListEventsResponseEvent

A pageable sequence of Event resources.

Example
// Create client
ServiceHealthClient serviceHealthClient = ServiceHealthClient.Create();
// Initialize request argument(s)
ListEventsRequest request = new ListEventsRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Filter = "",
    View = EventView.Unspecified,
};
// Make the request
PagedEnumerable<ListEventsResponse, Event> response = serviceHealthClient.ListEvents(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (Event item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListEventsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Event item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Event> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Event item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListEvents(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListEventsResponse, Event> ListEvents(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists events under a given project and location.

Parameters
NameDescription
parentstring

Required. Parent value using the form projects/{project_id}/locations/{location}/events.

project_id - ID of the project for which to list service health events. location - The location to get the service health events from. To retrieve service health events of category = INCIDENT, use location = global.

pageTokenstring

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListEventsResponseEvent

A pageable sequence of Event resources.

Example
// Create client
ServiceHealthClient serviceHealthClient = ServiceHealthClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedEnumerable<ListEventsResponse, Event> response = serviceHealthClient.ListEvents(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (Event item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListEventsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Event item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Event> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Event item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListEventsAsync(LocationName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListEventsResponse, Event> ListEventsAsync(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists events under a given project and location.

Parameters
NameDescription
parentLocationName

Required. Parent value using the form projects/{project_id}/locations/{location}/events.

project_id - ID of the project for which to list service health events. location - The location to get the service health events from. To retrieve service health events of category = INCIDENT, use location = global.

pageTokenstring

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListEventsResponseEvent

A pageable asynchronous sequence of Event resources.

Example
// Create client
ServiceHealthClient serviceHealthClient = await ServiceHealthClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListEventsResponse, Event> response = serviceHealthClient.ListEventsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Event item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListEventsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Event item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Event> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Event item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListEventsAsync(ListEventsRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListEventsResponse, Event> ListEventsAsync(ListEventsRequest request, CallSettings callSettings = null)

Lists events under a given project and location.

Parameters
NameDescription
requestListEventsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListEventsResponseEvent

A pageable asynchronous sequence of Event resources.

Example
// Create client
ServiceHealthClient serviceHealthClient = await ServiceHealthClient.CreateAsync();
// Initialize request argument(s)
ListEventsRequest request = new ListEventsRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Filter = "",
    View = EventView.Unspecified,
};
// Make the request
PagedAsyncEnumerable<ListEventsResponse, Event> response = serviceHealthClient.ListEventsAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Event item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListEventsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Event item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Event> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Event item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListEventsAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListEventsResponse, Event> ListEventsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists events under a given project and location.

Parameters
NameDescription
parentstring

Required. Parent value using the form projects/{project_id}/locations/{location}/events.

project_id - ID of the project for which to list service health events. location - The location to get the service health events from. To retrieve service health events of category = INCIDENT, use location = global.

pageTokenstring

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListEventsResponseEvent

A pageable asynchronous sequence of Event resources.

Example
// Create client
ServiceHealthClient serviceHealthClient = await ServiceHealthClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<ListEventsResponse, Event> response = serviceHealthClient.ListEventsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Event item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListEventsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Event item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Event> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Event item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListOrganizationEvents(ListOrganizationEventsRequest, CallSettings)

public virtual PagedEnumerable<ListOrganizationEventsResponse, OrganizationEvent> ListOrganizationEvents(ListOrganizationEventsRequest request, CallSettings callSettings = null)

Lists organization events under a given organization and location.

Parameters
NameDescription
requestListOrganizationEventsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListOrganizationEventsResponseOrganizationEvent

A pageable sequence of OrganizationEvent resources.

Example
// Create client
ServiceHealthClient serviceHealthClient = ServiceHealthClient.Create();
// Initialize request argument(s)
ListOrganizationEventsRequest request = new ListOrganizationEventsRequest
{
    ParentAsOrganizationLocationName = OrganizationLocationName.FromOrganizationLocation("[ORGANIZATION]", "[LOCATION]"),
    Filter = "",
    View = OrganizationEventView.Unspecified,
};
// Make the request
PagedEnumerable<ListOrganizationEventsResponse, OrganizationEvent> response = serviceHealthClient.ListOrganizationEvents(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (OrganizationEvent item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListOrganizationEventsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (OrganizationEvent item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<OrganizationEvent> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (OrganizationEvent item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListOrganizationEvents(OrganizationLocationName, string, int?, CallSettings)

public virtual PagedEnumerable<ListOrganizationEventsResponse, OrganizationEvent> ListOrganizationEvents(OrganizationLocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists organization events under a given organization and location.

Parameters
NameDescription
parentOrganizationLocationName

Required. Parent value using the form organizations/{organization_id}/locations/{location}/organizationEvents.

organization_id - ID (number) of the project that contains the event. To get your organization_id, see Getting your organization resource ID.<br> location - The location to get the service health events from. To retrieve service health events of category = INCIDENT, use location = global.

pageTokenstring

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListOrganizationEventsResponseOrganizationEvent

A pageable sequence of OrganizationEvent resources.

Example
// Create client
ServiceHealthClient serviceHealthClient = ServiceHealthClient.Create();
// Initialize request argument(s)
OrganizationLocationName parent = OrganizationLocationName.FromOrganizationLocation("[ORGANIZATION]", "[LOCATION]");
// Make the request
PagedEnumerable<ListOrganizationEventsResponse, OrganizationEvent> response = serviceHealthClient.ListOrganizationEvents(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (OrganizationEvent item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListOrganizationEventsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (OrganizationEvent item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<OrganizationEvent> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (OrganizationEvent item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListOrganizationEvents(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListOrganizationEventsResponse, OrganizationEvent> ListOrganizationEvents(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists organization events under a given organization and location.

Parameters
NameDescription
parentstring

Required. Parent value using the form organizations/{organization_id}/locations/{location}/organizationEvents.

organization_id - ID (number) of the project that contains the event. To get your organization_id, see Getting your organization resource ID.<br> location - The location to get the service health events from. To retrieve service health events of category = INCIDENT, use location = global.

pageTokenstring

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListOrganizationEventsResponseOrganizationEvent

A pageable sequence of OrganizationEvent resources.

Example
// Create client
ServiceHealthClient serviceHealthClient = ServiceHealthClient.Create();
// Initialize request argument(s)
string parent = "organizations/[ORGANIZATION]/locations/[LOCATION]";
// Make the request
PagedEnumerable<ListOrganizationEventsResponse, OrganizationEvent> response = serviceHealthClient.ListOrganizationEvents(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (OrganizationEvent item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListOrganizationEventsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (OrganizationEvent item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<OrganizationEvent> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (OrganizationEvent item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListOrganizationEventsAsync(ListOrganizationEventsRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListOrganizationEventsResponse, OrganizationEvent> ListOrganizationEventsAsync(ListOrganizationEventsRequest request, CallSettings callSettings = null)

Lists organization events under a given organization and location.

Parameters
NameDescription
requestListOrganizationEventsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListOrganizationEventsResponseOrganizationEvent

A pageable asynchronous sequence of OrganizationEvent resources.

Example
// Create client
ServiceHealthClient serviceHealthClient = await ServiceHealthClient.CreateAsync();
// Initialize request argument(s)
ListOrganizationEventsRequest request = new ListOrganizationEventsRequest
{
    ParentAsOrganizationLocationName = OrganizationLocationName.FromOrganizationLocation("[ORGANIZATION]", "[LOCATION]"),
    Filter = "",
    View = OrganizationEventView.Unspecified,
};
// Make the request
PagedAsyncEnumerable<ListOrganizationEventsResponse, OrganizationEvent> response = serviceHealthClient.ListOrganizationEventsAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((OrganizationEvent item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListOrganizationEventsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (OrganizationEvent item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<OrganizationEvent> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (OrganizationEvent item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListOrganizationEventsAsync(OrganizationLocationName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListOrganizationEventsResponse, OrganizationEvent> ListOrganizationEventsAsync(OrganizationLocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists organization events under a given organization and location.

Parameters
NameDescription
parentOrganizationLocationName

Required. Parent value using the form organizations/{organization_id}/locations/{location}/organizationEvents.

organization_id - ID (number) of the project that contains the event. To get your organization_id, see Getting your organization resource ID.<br> location - The location to get the service health events from. To retrieve service health events of category = INCIDENT, use location = global.

pageTokenstring

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListOrganizationEventsResponseOrganizationEvent

A pageable asynchronous sequence of OrganizationEvent resources.

Example
// Create client
ServiceHealthClient serviceHealthClient = await ServiceHealthClient.CreateAsync();
// Initialize request argument(s)
OrganizationLocationName parent = OrganizationLocationName.FromOrganizationLocation("[ORGANIZATION]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListOrganizationEventsResponse, OrganizationEvent> response = serviceHealthClient.ListOrganizationEventsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((OrganizationEvent item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListOrganizationEventsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (OrganizationEvent item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<OrganizationEvent> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (OrganizationEvent item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListOrganizationEventsAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListOrganizationEventsResponse, OrganizationEvent> ListOrganizationEventsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists organization events under a given organization and location.

Parameters
NameDescription
parentstring

Required. Parent value using the form organizations/{organization_id}/locations/{location}/organizationEvents.

organization_id - ID (number) of the project that contains the event. To get your organization_id, see Getting your organization resource ID.<br> location - The location to get the service health events from. To retrieve service health events of category = INCIDENT, use location = global.

pageTokenstring

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListOrganizationEventsResponseOrganizationEvent

A pageable asynchronous sequence of OrganizationEvent resources.

Example
// Create client
ServiceHealthClient serviceHealthClient = await ServiceHealthClient.CreateAsync();
// Initialize request argument(s)
string parent = "organizations/[ORGANIZATION]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<ListOrganizationEventsResponse, OrganizationEvent> response = serviceHealthClient.ListOrganizationEventsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((OrganizationEvent item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListOrganizationEventsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (OrganizationEvent item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<OrganizationEvent> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (OrganizationEvent item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListOrganizationImpacts(ListOrganizationImpactsRequest, CallSettings)

public virtual PagedEnumerable<ListOrganizationImpactsResponse, OrganizationImpact> ListOrganizationImpacts(ListOrganizationImpactsRequest request, CallSettings callSettings = null)

Lists assets impacted by organization events under a given organization and location.

Parameters
NameDescription
requestListOrganizationImpactsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListOrganizationImpactsResponseOrganizationImpact

A pageable sequence of OrganizationImpact resources.

Example
// Create client
ServiceHealthClient serviceHealthClient = ServiceHealthClient.Create();
// Initialize request argument(s)
ListOrganizationImpactsRequest request = new ListOrganizationImpactsRequest
{
    ParentAsOrganizationLocationName = OrganizationLocationName.FromOrganizationLocation("[ORGANIZATION]", "[LOCATION]"),
    Filter = "",
};
// Make the request
PagedEnumerable<ListOrganizationImpactsResponse, OrganizationImpact> response = serviceHealthClient.ListOrganizationImpacts(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (OrganizationImpact item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListOrganizationImpactsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (OrganizationImpact item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<OrganizationImpact> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (OrganizationImpact item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListOrganizationImpacts(OrganizationLocationName, string, int?, CallSettings)

public virtual PagedEnumerable<ListOrganizationImpactsResponse, OrganizationImpact> ListOrganizationImpacts(OrganizationLocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists assets impacted by organization events under a given organization and location.

Parameters
NameDescription
parentOrganizationLocationName

Required. Parent value using the form organizations/{organization_id}/locations/{location}/organizationImpacts.

organization_id - ID (number) of the project that contains the event. To get your organization_id, see Getting your organization resource ID.

pageTokenstring

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListOrganizationImpactsResponseOrganizationImpact

A pageable sequence of OrganizationImpact resources.

Example
// Create client
ServiceHealthClient serviceHealthClient = ServiceHealthClient.Create();
// Initialize request argument(s)
OrganizationLocationName parent = OrganizationLocationName.FromOrganizationLocation("[ORGANIZATION]", "[LOCATION]");
// Make the request
PagedEnumerable<ListOrganizationImpactsResponse, OrganizationImpact> response = serviceHealthClient.ListOrganizationImpacts(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (OrganizationImpact item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListOrganizationImpactsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (OrganizationImpact item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<OrganizationImpact> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (OrganizationImpact item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListOrganizationImpacts(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListOrganizationImpactsResponse, OrganizationImpact> ListOrganizationImpacts(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists assets impacted by organization events under a given organization and location.

Parameters
NameDescription
parentstring

Required. Parent value using the form organizations/{organization_id}/locations/{location}/organizationImpacts.

organization_id - ID (number) of the project that contains the event. To get your organization_id, see Getting your organization resource ID.

pageTokenstring

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListOrganizationImpactsResponseOrganizationImpact

A pageable sequence of OrganizationImpact resources.

Example
// Create client
ServiceHealthClient serviceHealthClient = ServiceHealthClient.Create();
// Initialize request argument(s)
string parent = "organizations/[ORGANIZATION]/locations/[LOCATION]";
// Make the request
PagedEnumerable<ListOrganizationImpactsResponse, OrganizationImpact> response = serviceHealthClient.ListOrganizationImpacts(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (OrganizationImpact item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListOrganizationImpactsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (OrganizationImpact item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<OrganizationImpact> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (OrganizationImpact item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListOrganizationImpactsAsync(ListOrganizationImpactsRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListOrganizationImpactsResponse, OrganizationImpact> ListOrganizationImpactsAsync(ListOrganizationImpactsRequest request, CallSettings callSettings = null)

Lists assets impacted by organization events under a given organization and location.

Parameters
NameDescription
requestListOrganizationImpactsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListOrganizationImpactsResponseOrganizationImpact

A pageable asynchronous sequence of OrganizationImpact resources.

Example
// Create client
ServiceHealthClient serviceHealthClient = await ServiceHealthClient.CreateAsync();
// Initialize request argument(s)
ListOrganizationImpactsRequest request = new ListOrganizationImpactsRequest
{
    ParentAsOrganizationLocationName = OrganizationLocationName.FromOrganizationLocation("[ORGANIZATION]", "[LOCATION]"),
    Filter = "",
};
// Make the request
PagedAsyncEnumerable<ListOrganizationImpactsResponse, OrganizationImpact> response = serviceHealthClient.ListOrganizationImpactsAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((OrganizationImpact item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListOrganizationImpactsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (OrganizationImpact item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<OrganizationImpact> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (OrganizationImpact item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListOrganizationImpactsAsync(OrganizationLocationName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListOrganizationImpactsResponse, OrganizationImpact> ListOrganizationImpactsAsync(OrganizationLocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists assets impacted by organization events under a given organization and location.

Parameters
NameDescription
parentOrganizationLocationName

Required. Parent value using the form organizations/{organization_id}/locations/{location}/organizationImpacts.

organization_id - ID (number) of the project that contains the event. To get your organization_id, see Getting your organization resource ID.

pageTokenstring

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListOrganizationImpactsResponseOrganizationImpact

A pageable asynchronous sequence of OrganizationImpact resources.

Example
// Create client
ServiceHealthClient serviceHealthClient = await ServiceHealthClient.CreateAsync();
// Initialize request argument(s)
OrganizationLocationName parent = OrganizationLocationName.FromOrganizationLocation("[ORGANIZATION]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListOrganizationImpactsResponse, OrganizationImpact> response = serviceHealthClient.ListOrganizationImpactsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((OrganizationImpact item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListOrganizationImpactsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (OrganizationImpact item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<OrganizationImpact> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (OrganizationImpact item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListOrganizationImpactsAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListOrganizationImpactsResponse, OrganizationImpact> ListOrganizationImpactsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists assets impacted by organization events under a given organization and location.

Parameters
NameDescription
parentstring

Required. Parent value using the form organizations/{organization_id}/locations/{location}/organizationImpacts.

organization_id - ID (number) of the project that contains the event. To get your organization_id, see Getting your organization resource ID.

pageTokenstring

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListOrganizationImpactsResponseOrganizationImpact

A pageable asynchronous sequence of OrganizationImpact resources.

Example
// Create client
ServiceHealthClient serviceHealthClient = await ServiceHealthClient.CreateAsync();
// Initialize request argument(s)
string parent = "organizations/[ORGANIZATION]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<ListOrganizationImpactsResponse, OrganizationImpact> response = serviceHealthClient.ListOrganizationImpactsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((OrganizationImpact item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListOrganizationImpactsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (OrganizationImpact item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<OrganizationImpact> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (OrganizationImpact item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ShutdownDefaultChannelsAsync()

public static Task ShutdownDefaultChannelsAsync()

Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.

Returns
TypeDescription
Task

A task representing the asynchronous shutdown operation.

Remarks

After calling this method, further calls to Create() and CreateAsync(CancellationToken) will create new channels, which could in turn be shut down by another call to this method.