public abstract class GroupServiceClient
Reference documentation and code samples for the Google Cloud Monitoring v3 API class GroupServiceClient.
GroupService client wrapper, for convenient use.
Derived Types
Namespace
Google.Cloud.Monitoring.V3Assembly
Google.Cloud.Monitoring.V3.dll
Remarks
The Group API lets you inspect and manage your groups.
A group is a named filter that is used to identify a collection of monitored resources. Groups are typically used to mirror the physical and/or logical topology of the environment. Because group membership is computed dynamically, monitored resources that are started in the future are automatically placed in matching groups. By using a group to name monitored resources in, for example, an alert policy, the target of that alert policy is updated automatically as monitored resources are added and removed from the infrastructure.
Properties
DefaultEndpoint
public static string DefaultEndpoint { get; }
The default endpoint for the GroupService service, which is a host of "monitoring.googleapis.com" and a port of 443.
Property Value | |
---|---|
Type | Description |
string |
DefaultScopes
public static IReadOnlyList<string> DefaultScopes { get; }
The default GroupService scopes.
Property Value | |
---|---|
Type | Description |
IReadOnlyListstring |
The default GroupService scopes are:
GrpcClient
public virtual GroupService.GroupServiceClient GrpcClient { get; }
The underlying gRPC GroupService client
Property Value | |
---|---|
Type | Description |
GroupServiceGroupServiceClient |
ServiceMetadata
public static ServiceMetadata ServiceMetadata { get; }
The service metadata associated with this client type.
Property Value | |
---|---|
Type | Description |
ServiceMetadata |
Methods
Create()
public static GroupServiceClient Create()
Synchronously creates a GroupServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use GroupServiceClientBuilder.
Returns | |
---|---|
Type | Description |
GroupServiceClient | The created GroupServiceClient. |
CreateAsync(CancellationToken)
public static Task<GroupServiceClient> CreateAsync(CancellationToken cancellationToken = default)
Asynchronously creates a GroupServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use GroupServiceClientBuilder.
Parameter | |
---|---|
Name | Description |
cancellationToken | CancellationToken The CancellationToken to use while creating the client. |
Returns | |
---|---|
Type | Description |
TaskGroupServiceClient | The task representing the created GroupServiceClient. |
CreateGroup(IResourceName, Group, CallSettings)
public virtual Group CreateGroup(IResourceName name, Group group, CallSettings callSettings = null)
Creates a new group.
Parameters | |
---|---|
Name | Description |
name | IResourceName Required. The project in which to create the group. The format is: projects/[PROJECT_ID_OR_NUMBER] |
group | Group Required. A group definition. It is an error to define the |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Group | The RPC response. |
// Create client
GroupServiceClient groupServiceClient = GroupServiceClient.Create();
// Initialize request argument(s)
IResourceName name = new UnparsedResourceName("a/wildcard/resource");
Group group = new Group();
// Make the request
Group response = groupServiceClient.CreateGroup(name, group);
CreateGroup(FolderName, Group, CallSettings)
public virtual Group CreateGroup(FolderName name, Group group, CallSettings callSettings = null)
Creates a new group.
Parameters | |
---|---|
Name | Description |
name | FolderName Required. The project in which to create the group. The format is: projects/[PROJECT_ID_OR_NUMBER] |
group | Group Required. A group definition. It is an error to define the |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Group | The RPC response. |
// Create client
GroupServiceClient groupServiceClient = GroupServiceClient.Create();
// Initialize request argument(s)
FolderName name = FolderName.FromFolder("[FOLDER]");
Group group = new Group();
// Make the request
Group response = groupServiceClient.CreateGroup(name, group);
CreateGroup(OrganizationName, Group, CallSettings)
public virtual Group CreateGroup(OrganizationName name, Group group, CallSettings callSettings = null)
Creates a new group.
Parameters | |
---|---|
Name | Description |
name | OrganizationName Required. The project in which to create the group. The format is: projects/[PROJECT_ID_OR_NUMBER] |
group | Group Required. A group definition. It is an error to define the |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Group | The RPC response. |
// Create client
GroupServiceClient groupServiceClient = GroupServiceClient.Create();
// Initialize request argument(s)
OrganizationName name = OrganizationName.FromOrganization("[ORGANIZATION]");
Group group = new Group();
// Make the request
Group response = groupServiceClient.CreateGroup(name, group);
CreateGroup(ProjectName, Group, CallSettings)
public virtual Group CreateGroup(ProjectName name, Group group, CallSettings callSettings = null)
Creates a new group.
Parameters | |
---|---|
Name | Description |
name | ProjectName Required. The project in which to create the group. The format is: projects/[PROJECT_ID_OR_NUMBER] |
group | Group Required. A group definition. It is an error to define the |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Group | The RPC response. |
// Create client
GroupServiceClient groupServiceClient = GroupServiceClient.Create();
// Initialize request argument(s)
ProjectName name = ProjectName.FromProject("[PROJECT]");
Group group = new Group();
// Make the request
Group response = groupServiceClient.CreateGroup(name, group);
CreateGroup(CreateGroupRequest, CallSettings)
public virtual Group CreateGroup(CreateGroupRequest request, CallSettings callSettings = null)
Creates a new group.
Parameters | |
---|---|
Name | Description |
request | CreateGroupRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Group | The RPC response. |
// Create client
GroupServiceClient groupServiceClient = GroupServiceClient.Create();
// Initialize request argument(s)
CreateGroupRequest request = new CreateGroupRequest
{
Group = new Group(),
ValidateOnly = false,
ProjectName = ProjectName.FromProject("[PROJECT]"),
};
// Make the request
Group response = groupServiceClient.CreateGroup(request);
CreateGroup(string, Group, CallSettings)
public virtual Group CreateGroup(string name, Group group, CallSettings callSettings = null)
Creates a new group.
Parameters | |
---|---|
Name | Description |
name | string Required. The project in which to create the group. The format is: projects/[PROJECT_ID_OR_NUMBER] |
group | Group Required. A group definition. It is an error to define the |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Group | The RPC response. |
// Create client
GroupServiceClient groupServiceClient = GroupServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]";
Group group = new Group();
// Make the request
Group response = groupServiceClient.CreateGroup(name, group);
CreateGroupAsync(IResourceName, Group, CallSettings)
public virtual Task<Group> CreateGroupAsync(IResourceName name, Group group, CallSettings callSettings = null)
Creates a new group.
Parameters | |
---|---|
Name | Description |
name | IResourceName Required. The project in which to create the group. The format is: projects/[PROJECT_ID_OR_NUMBER] |
group | Group Required. A group definition. It is an error to define the |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskGroup | A Task containing the RPC response. |
// Create client
GroupServiceClient groupServiceClient = await GroupServiceClient.CreateAsync();
// Initialize request argument(s)
IResourceName name = new UnparsedResourceName("a/wildcard/resource");
Group group = new Group();
// Make the request
Group response = await groupServiceClient.CreateGroupAsync(name, group);
CreateGroupAsync(IResourceName, Group, CancellationToken)
public virtual Task<Group> CreateGroupAsync(IResourceName name, Group group, CancellationToken cancellationToken)
Creates a new group.
Parameters | |
---|---|
Name | Description |
name | IResourceName Required. The project in which to create the group. The format is: projects/[PROJECT_ID_OR_NUMBER] |
group | Group Required. A group definition. It is an error to define the |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskGroup | A Task containing the RPC response. |
// Create client
GroupServiceClient groupServiceClient = await GroupServiceClient.CreateAsync();
// Initialize request argument(s)
IResourceName name = new UnparsedResourceName("a/wildcard/resource");
Group group = new Group();
// Make the request
Group response = await groupServiceClient.CreateGroupAsync(name, group);
CreateGroupAsync(FolderName, Group, CallSettings)
public virtual Task<Group> CreateGroupAsync(FolderName name, Group group, CallSettings callSettings = null)
Creates a new group.
Parameters | |
---|---|
Name | Description |
name | FolderName Required. The project in which to create the group. The format is: projects/[PROJECT_ID_OR_NUMBER] |
group | Group Required. A group definition. It is an error to define the |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskGroup | A Task containing the RPC response. |
// Create client
GroupServiceClient groupServiceClient = await GroupServiceClient.CreateAsync();
// Initialize request argument(s)
FolderName name = FolderName.FromFolder("[FOLDER]");
Group group = new Group();
// Make the request
Group response = await groupServiceClient.CreateGroupAsync(name, group);
CreateGroupAsync(FolderName, Group, CancellationToken)
public virtual Task<Group> CreateGroupAsync(FolderName name, Group group, CancellationToken cancellationToken)
Creates a new group.
Parameters | |
---|---|
Name | Description |
name | FolderName Required. The project in which to create the group. The format is: projects/[PROJECT_ID_OR_NUMBER] |
group | Group Required. A group definition. It is an error to define the |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskGroup | A Task containing the RPC response. |
// Create client
GroupServiceClient groupServiceClient = await GroupServiceClient.CreateAsync();
// Initialize request argument(s)
FolderName name = FolderName.FromFolder("[FOLDER]");
Group group = new Group();
// Make the request
Group response = await groupServiceClient.CreateGroupAsync(name, group);
CreateGroupAsync(OrganizationName, Group, CallSettings)
public virtual Task<Group> CreateGroupAsync(OrganizationName name, Group group, CallSettings callSettings = null)
Creates a new group.
Parameters | |
---|---|
Name | Description |
name | OrganizationName Required. The project in which to create the group. The format is: projects/[PROJECT_ID_OR_NUMBER] |
group | Group Required. A group definition. It is an error to define the |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskGroup | A Task containing the RPC response. |
// Create client
GroupServiceClient groupServiceClient = await GroupServiceClient.CreateAsync();
// Initialize request argument(s)
OrganizationName name = OrganizationName.FromOrganization("[ORGANIZATION]");
Group group = new Group();
// Make the request
Group response = await groupServiceClient.CreateGroupAsync(name, group);
CreateGroupAsync(OrganizationName, Group, CancellationToken)
public virtual Task<Group> CreateGroupAsync(OrganizationName name, Group group, CancellationToken cancellationToken)
Creates a new group.
Parameters | |
---|---|
Name | Description |
name | OrganizationName Required. The project in which to create the group. The format is: projects/[PROJECT_ID_OR_NUMBER] |
group | Group Required. A group definition. It is an error to define the |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskGroup | A Task containing the RPC response. |
// Create client
GroupServiceClient groupServiceClient = await GroupServiceClient.CreateAsync();
// Initialize request argument(s)
OrganizationName name = OrganizationName.FromOrganization("[ORGANIZATION]");
Group group = new Group();
// Make the request
Group response = await groupServiceClient.CreateGroupAsync(name, group);
CreateGroupAsync(ProjectName, Group, CallSettings)
public virtual Task<Group> CreateGroupAsync(ProjectName name, Group group, CallSettings callSettings = null)
Creates a new group.
Parameters | |
---|---|
Name | Description |
name | ProjectName Required. The project in which to create the group. The format is: projects/[PROJECT_ID_OR_NUMBER] |
group | Group Required. A group definition. It is an error to define the |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskGroup | A Task containing the RPC response. |
// Create client
GroupServiceClient groupServiceClient = await GroupServiceClient.CreateAsync();
// Initialize request argument(s)
ProjectName name = ProjectName.FromProject("[PROJECT]");
Group group = new Group();
// Make the request
Group response = await groupServiceClient.CreateGroupAsync(name, group);
CreateGroupAsync(ProjectName, Group, CancellationToken)
public virtual Task<Group> CreateGroupAsync(ProjectName name, Group group, CancellationToken cancellationToken)
Creates a new group.
Parameters | |
---|---|
Name | Description |
name | ProjectName Required. The project in which to create the group. The format is: projects/[PROJECT_ID_OR_NUMBER] |
group | Group Required. A group definition. It is an error to define the |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskGroup | A Task containing the RPC response. |
// Create client
GroupServiceClient groupServiceClient = await GroupServiceClient.CreateAsync();
// Initialize request argument(s)
ProjectName name = ProjectName.FromProject("[PROJECT]");
Group group = new Group();
// Make the request
Group response = await groupServiceClient.CreateGroupAsync(name, group);
CreateGroupAsync(CreateGroupRequest, CallSettings)
public virtual Task<Group> CreateGroupAsync(CreateGroupRequest request, CallSettings callSettings = null)
Creates a new group.
Parameters | |
---|---|
Name | Description |
request | CreateGroupRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
|