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.
Type | Description |
String |
DefaultScopes
public static IReadOnlyList<string> DefaultScopes { get; }
The default GroupService scopes.
Type | Description |
IReadOnlyList<String> |
The default GroupService scopes are:
GrpcClient
public virtual GroupService.GroupServiceClient GrpcClient { get; }
The underlying gRPC GroupService client
Type | Description |
GroupService.GroupServiceClient |
ServiceMetadata
public static ServiceMetadata ServiceMetadata { get; }
The service metadata associated with this client type.
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.
Type | Description |
GroupServiceClient | The created GroupServiceClient. |
CreateAsync(CancellationToken)
public static Task<GroupServiceClient> CreateAsync(CancellationToken cancellationToken = default(CancellationToken))
Asynchronously creates a GroupServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use GroupServiceClientBuilder.
Name | Description |
cancellationToken | CancellationToken The CancellationToken to use while creating the client. |
Type | Description |
Task<GroupServiceClient> | 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.
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. |
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.
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. |
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.
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. |
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.
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. |
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.
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. |
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.
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. |
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.
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. |
Type | Description |
Task<Group> | 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.
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. |
Type | Description |
Task<Group> | 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.
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. |
Type | Description |
Task<Group> | 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.
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. |
Type | Description |
Task<Group> | 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.
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. |
Type | Description |
Task<Group> | 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.
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. |
Type | Description |
Task<Group> | 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.
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. |
Type | Description |
Task<Group> | 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.
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. |
Type | Description |
Task<Group> | 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.
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. |
Type | Description |
Task<Group> | A Task containing the RPC response. |
// Create client
GroupServiceClient groupServiceClient = await GroupServiceClient.CreateAsync();
// Initialize request argument(s)
CreateGroupRequest request = new CreateGroupRequest
{
Group = new Group(),
ValidateOnly = false,
ProjectName = ProjectName.FromProject("[PROJECT]"),
};
// Make the request
Group response = await groupServiceClient.CreateGroupAsync(request);
CreateGroupAsync(CreateGroupRequest, CancellationToken)
public virtual Task<Group> CreateGroupAsync(CreateGroupRequest request, CancellationToken cancellationToken)
Creates a new group.
Name | Description |
request | CreateGroupRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Type | Description |
Task<Group> | A Task containing the RPC response. |
// Create client
GroupServiceClient groupServiceClient = await GroupServiceClient.CreateAsync();
// Initialize request argument(s)
CreateGroupRequest request = new CreateGroupRequest
{
Group = new Group(),
ValidateOnly = false,
ProjectName = ProjectName.FromProject("[PROJECT]"),
};
// Make the request
Group response = await groupServiceClient.CreateGroupAsync(request);
CreateGroupAsync(String, Group, CallSettings)
public virtual Task<Group> CreateGroupAsync(string name, Group group, CallSettings callSettings = null)
Creates a new group.
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. |
Type | Description |
Task<Group> | A Task containing the RPC response. |
// Create client
GroupServiceClient groupServiceClient = await GroupServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]";
Group group = new Group();
// Make the request
Group response = await groupServiceClient.CreateGroupAsync(name, group);
CreateGroupAsync(String, Group, CancellationToken)
public virtual Task<Group> CreateGroupAsync(string name, Group group, CancellationToken cancellationToken)
Creates a new group.
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 |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Type | Description |
Task<Group> | A Task containing the RPC response. |
// Create client
GroupServiceClient groupServiceClient = await GroupServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]";
Group group = new Group();
// Make the request
Group response = await groupServiceClient.CreateGroupAsync(name, group);
DeleteGroup(IResourceName, CallSettings)
public virtual void DeleteGroup(IResourceName name, CallSettings callSettings = null)
Deletes an existing group.
Name | Description |
name | IResourceName Required. The group to delete. The format is: projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
// Create client
GroupServiceClient groupServiceClient = GroupServiceClient.Create();
// Initialize request argument(s)
IResourceName name = new UnparsedResourceName("a/wildcard/resource");
// Make the request
groupServiceClient.DeleteGroup(name);
DeleteGroup(DeleteGroupRequest, CallSettings)
public virtual void DeleteGroup(DeleteGroupRequest request, CallSettings callSettings = null)
Deletes an existing group.
Name | Description |
request | DeleteGroupRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
// Create client
GroupServiceClient groupServiceClient = GroupServiceClient.Create();
// Initialize request argument(s)
DeleteGroupRequest request = new DeleteGroupRequest
{
GroupName = GroupName.FromProjectGroup("[PROJECT]", "[GROUP]"),
Recursive = false,
};
// Make the request
groupServiceClient.DeleteGroup(request);
DeleteGroup(GroupName, CallSettings)
public virtual void DeleteGroup(GroupName name, CallSettings callSettings = null)
Deletes an existing group.
Name | Description |
name | GroupName Required. The group to delete. The format is: projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
// Create client
GroupServiceClient groupServiceClient = GroupServiceClient.Create();
// Initialize request argument(s)
GroupName name = GroupName.FromProjectGroup("[PROJECT]", "[GROUP]");
// Make the request
groupServiceClient.DeleteGroup(name);
DeleteGroup(String, CallSettings)
public virtual void DeleteGroup(string name, CallSettings callSettings = null)
Deletes an existing group.
Name | Description |
name | String Required. The group to delete. The format is: projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
// Create client
GroupServiceClient groupServiceClient = GroupServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/groups/[GROUP]";
// Make the request
groupServiceClient.DeleteGroup(name);
DeleteGroupAsync(IResourceName, CallSettings)
public virtual Task DeleteGroupAsync(IResourceName name, CallSettings callSettings = null)
Deletes an existing group.
Name | Description |
name | IResourceName Required. The group to delete. The format is: projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Type | Description |
Task | A Task containing the RPC response. |
// Create client
GroupServiceClient groupServiceClient = await GroupServiceClient.CreateAsync();
// Initialize request argument(s)
IResourceName name = new UnparsedResourceName("a/wildcard/resource");
// Make the request
await groupServiceClient.DeleteGroupAsync(name);
DeleteGroupAsync(IResourceName, CancellationToken)
public virtual Task DeleteGroupAsync(IResourceName name, CancellationToken cancellationToken)
Deletes an existing group.
Name | Description |
name | IResourceName Required. The group to delete. The format is: projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Type | Description |
Task | A Task containing the RPC response. |
// Create client
GroupServiceClient groupServiceClient = await GroupServiceClient.CreateAsync();
// Initialize request argument(s)
IResourceName name = new UnparsedResourceName("a/wildcard/resource");
// Make the request
await groupServiceClient.DeleteGroupAsync(name);
DeleteGroupAsync(DeleteGroupRequest, CallSettings)
public virtual Task DeleteGroupAsync(DeleteGroupRequest request, CallSettings callSettings = null)
Deletes an existing group.
Name | Description |
request | DeleteGroupRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Type | Description |
Task | A Task containing the RPC response. |
// Create client
GroupServiceClient groupServiceClient = await GroupServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteGroupRequest request = new DeleteGroupRequest
{
GroupName = GroupName.FromProjectGroup("[PROJECT]", "[GROUP]"),
Recursive = false,
};
// Make the request
await groupServiceClient.DeleteGroupAsync(request);
DeleteGroupAsync(DeleteGroupRequest, CancellationToken)
public virtual Task DeleteGroupAsync(DeleteGroupRequest request, CancellationToken cancellationToken)
Deletes an existing group.
Name | Description |
request | DeleteGroupRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Type | Description |
Task | A Task containing the RPC response. |
// Create client
GroupServiceClient groupServiceClient = await GroupServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteGroupRequest request = new DeleteGroupRequest
{
GroupName = GroupName.FromProjectGroup("[PROJECT]", "[GROUP]"),
Recursive = false,
};
// Make the request
await groupServiceClient.DeleteGroupAsync(request);
DeleteGroupAsync(GroupName, CallSettings)
public virtual Task DeleteGroupAsync(GroupName name, CallSettings callSettings = null)
Deletes an existing group.
Name | Description |
name | GroupName Required. The group to delete. The format is: projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Type | Description |
Task | A Task containing the RPC response. |
// Create client
GroupServiceClient groupServiceClient = await GroupServiceClient.CreateAsync();
// Initialize request argument(s)
GroupName name = GroupName.FromProjectGroup("[PROJECT]", "[GROUP]");
// Make the request
await groupServiceClient.DeleteGroupAsync(name);
DeleteGroupAsync(GroupName, CancellationToken)
public virtual Task DeleteGroupAsync(GroupName name, CancellationToken cancellationToken)
Deletes an existing group.
Name | Description |
name | GroupName Required. The group to delete. The format is: projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Type | Description |
Task | A Task containing the RPC response. |
// Create client
GroupServiceClient groupServiceClient = await GroupServiceClient.CreateAsync();
// Initialize request argument(s)
GroupName name = GroupName.FromProjectGroup("[PROJECT]", "[GROUP]");
// Make the request
await groupServiceClient.DeleteGroupAsync(name);
DeleteGroupAsync(String, CallSettings)
public virtual Task DeleteGroupAsync(string name, CallSettings callSettings = null)
Deletes an existing group.
Name |