Google Cloud Monitoring v3 API - Class GroupServiceClient (3.5.0)

public abstract class GroupServiceClient

Reference documentation and code samples for the Google Cloud Monitoring v3 API class GroupServiceClient.

GroupService client wrapper, for convenient use.

Inheritance

object > GroupServiceClient

Derived Types

Namespace

Google.Cloud.Monitoring.V3

Assembly

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
TypeDescription
string

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default GroupService scopes.

Property Value
TypeDescription
IReadOnlyListstring
Remarks

GrpcClient

public virtual GroupService.GroupServiceClient GrpcClient { get; }

The underlying gRPC GroupService client

Property Value
TypeDescription
GroupServiceGroupServiceClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
TypeDescription
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
TypeDescription
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
NameDescription
cancellationTokenCancellationToken

The CancellationToken to use while creating the client.

Returns
TypeDescription
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
NameDescription
nameIResourceName

Required. The project in which to create the group. The format is:

projects/[PROJECT_ID_OR_NUMBER]

groupGroup

Required. A group definition. It is an error to define the name field because the system assigns the name.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Group

The RPC response.

Example
// 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
NameDescription
nameFolderName

Required. The project in which to create the group. The format is:

projects/[PROJECT_ID_OR_NUMBER]

groupGroup

Required. A group definition. It is an error to define the name field because the system assigns the name.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Group

The RPC response.

Example
// 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
NameDescription
nameOrganizationName

Required. The project in which to create the group. The format is:

projects/[PROJECT_ID_OR_NUMBER]

groupGroup

Required. A group definition. It is an error to define the name field because the system assigns the name.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Group

The RPC response.

Example
// 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
NameDescription
nameProjectName

Required. The project in which to create the group. The format is:

projects/[PROJECT_ID_OR_NUMBER]

groupGroup

Required. A group definition. It is an error to define the name field because the system assigns the name.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Group

The RPC response.

Example
// 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
NameDescription
requestCreateGroupRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Group

The RPC response.

Example
// 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
NameDescription
namestring

Required. The project in which to create the group. The format is:

projects/[PROJECT_ID_OR_NUMBER]

groupGroup

Required. A group definition. It is an error to define the name field because the system assigns the name.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Group

The RPC response.

Example
// 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
NameDescription
nameIResourceName

Required. The project in which to create the group. The format is:

projects/[PROJECT_ID_OR_NUMBER]

groupGroup

Required. A group definition. It is an error to define the name field because the system assigns the name.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskGroup

A Task containing the RPC response.

Example
// 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
NameDescription
nameIResourceName

Required. The project in which to create the group. The format is:

projects/[PROJECT_ID_OR_NUMBER]

groupGroup

Required. A group definition. It is an error to define the name field because the system assigns the name.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskGroup

A Task containing the RPC response.

Example
// 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
NameDescription
nameFolderName

Required. The project in which to create the group. The format is:

projects/[PROJECT_ID_OR_NUMBER]

groupGroup

Required. A group definition. It is an error to define the name field because the system assigns the name.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskGroup

A Task containing the RPC response.

Example
// 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
NameDescription
nameFolderName

Required. The project in which to create the group. The format is:

projects/[PROJECT_ID_OR_NUMBER]

groupGroup

Required. A group definition. It is an error to define the name field because the system assigns the name.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskGroup

A Task containing the RPC response.

Example
// 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
NameDescription
nameOrganizationName

Required. The project in which to create the group. The format is:

projects/[PROJECT_ID_OR_NUMBER]

groupGroup

Required. A group definition. It is an error to define the name field because the system assigns the name.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskGroup

A Task containing the RPC response.

Example
// 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
NameDescription
nameOrganizationName

Required. The project in which to create the group. The format is:

projects/[PROJECT_ID_OR_NUMBER]

groupGroup

Required. A group definition. It is an error to define the name field because the system assigns the name.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskGroup

A Task containing the RPC response.

Example
// 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
NameDescription
nameProjectName

Required. The project in which to create the group. The format is:

projects/[PROJECT_ID_OR_NUMBER]

groupGroup

Required. A group definition. It is an error to define the name field because the system assigns the name.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskGroup

A Task containing the RPC response.

Example
// 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
NameDescription
nameProjectName

Required. The project in which to create the group. The format is:

projects/[PROJECT_ID_OR_NUMBER]

groupGroup

Required. A group definition. It is an error to define the name field because the system assigns the name.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskGroup

A Task containing the RPC response.

Example
// 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
NameDescription
requestCreateGroupRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskGroup

A Task containing the RPC response.

Example
// 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.

Parameters
NameDescription
requestCreateGroupRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskGroup

A Task containing the RPC response.

Example
// 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.

Parameters
NameDescription
namestring

Required. The project in which to create the group. The format is:

projects/[PROJECT_ID_OR_NUMBER]

groupGroup

Required. A group definition. It is an error to define the name field because the system assigns the name.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskGroup

A Task containing the RPC response.

Example
// 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.

Parameters
NameDescription
namestring

Required. The project in which to create the group. The format is:

projects/[PROJECT_ID_OR_NUMBER]

groupGroup

Required. A group definition. It is an error to define the name field because the system assigns the name.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskGroup

A Task containing the RPC response.

Example
// 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.

Parameters
NameDescription
nameIResourceName

Required. The group to delete. The format is:

projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID]

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// 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.

Parameters
NameDescription
requestDeleteGroupRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// 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.

Parameters
NameDescription
nameGroupName

Required. The group to delete. The format is:

projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID]

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// 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.

Parameters
NameDescription
namestring

Required. The group to delete. The format is:

projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID]

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// 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.

Parameters
NameDescription
nameIResourceName

Required. The group to delete. The format is:

projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID]

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// 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.

Parameters
NameDescription
nameIResourceName

Required. The group to delete. The format is:

projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID]

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// 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.

Parameters
NameDescription
requestDeleteGroupRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// 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.

Parameters
NameDescription
requestDeleteGroupRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// 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.

Parameters
NameDescription
nameGroupName

Required. The group to delete. The format is:

projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID]

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// 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.

Parameters
NameDescription
nameGroupName

Required. The group to delete. The format is:

projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID]

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// 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.

Parameters
NameDescription
namestring

Required. The group to delete. The format is:

projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID]

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
GroupServiceClient groupServiceClient = await GroupServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/groups/[GROUP]";
// Make the request
await groupServiceClient.DeleteGroupAsync(name);

DeleteGroupAsync(string, CancellationToken)

public virtual Task DeleteGroupAsync(string name, CancellationToken cancellationToken)

Deletes an existing group.

Parameters
NameDescription
namestring

Required. The group to delete. The format is:

projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID]

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
GroupServiceClient groupServiceClient = await GroupServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/groups/[GROUP]";
// Make the request
await groupServiceClient.DeleteGroupAsync(name);

GetGroup(IResourceName, CallSettings)

public virtual Group GetGroup(IResourceName name, CallSettings callSettings = null)

Gets a single group.

Parameters
NameDescription
nameIResourceName

Required. The group to retrieve. The format is:

projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID]

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Group

The RPC response.

Example
// Create client
GroupServiceClient groupServiceClient = GroupServiceClient.Create();
// Initialize request argument(s)
IResourceName name = new UnparsedResourceName("a/wildcard/resource");
// Make the request
Group response = groupServiceClient.GetGroup(name);

GetGroup(GetGroupRequest, CallSettings)

public virtual Group GetGroup(GetGroupRequest request, CallSettings callSettings = null)

Gets a single group.

Parameters
NameDescription
requestGetGroupRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Group

The RPC response.

Example
// Create client
GroupServiceClient groupServiceClient = GroupServiceClient.Create();
// Initialize request argument(s)
GetGroupRequest request = new GetGroupRequest
{
    GroupName = GroupName.FromProjectGroup("[PROJECT]", "[GROUP]"),
};
// Make the request
Group response = groupServiceClient.GetGroup(request);

GetGroup(GroupName, CallSettings)

public virtual Group GetGroup(GroupName name, CallSettings callSettings = null)

Gets a single group.

Parameters
NameDescription
nameGroupName

Required. The group to retrieve. The format is:

projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID]

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Group

The RPC response.

Example
// Create client
GroupServiceClient groupServiceClient = GroupServiceClient.Create();
// Initialize request argument(s)
GroupName name = GroupName.FromProjectGroup("[PROJECT]", "[GROUP]");
// Make the request
Group response = groupServiceClient.GetGroup(name);

GetGroup(string, CallSettings)

public virtual Group GetGroup(string name, CallSettings callSettings = null)

Gets a single group.

Parameters
NameDescription
namestring

Required. The group to retrieve. The format is:

projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID]

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Group

The RPC response.

Example
// Create client
GroupServiceClient groupServiceClient = GroupServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/groups/[GROUP]";
// Make the request
Group response = groupServiceClient.GetGroup(name);

GetGroupAsync(IResourceName, CallSettings)

public virtual Task<Group> GetGroupAsync(IResourceName name, CallSettings callSettings = null)

Gets a single group.

Parameters
NameDescription
nameIResourceName

Required. The group to retrieve. The format is:

projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID]

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskGroup

A Task containing the RPC response.

Example
// Create client
GroupServiceClient groupServiceClient = await GroupServiceClient.CreateAsync();
// Initialize request argument(s)
IResourceName name = new UnparsedResourceName("a/wildcard/resource");
// Make the request
Group response = await groupServiceClient.GetGroupAsync(name);

GetGroupAsync(IResourceName, CancellationToken)

public virtual Task<Group> GetGroupAsync(IResourceName name, CancellationToken cancellationToken)

Gets a single group.

Parameters
NameDescription
nameIResourceName

Required. The group to retrieve. The format is:

projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID]

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskGroup

A Task containing the RPC response.

Example
// Create client
GroupServiceClient groupServiceClient = await GroupServiceClient.CreateAsync();
// Initialize request argument(s)
IResourceName name = new UnparsedResourceName("a/wildcard/resource");
// Make the request
Group response = await groupServiceClient.GetGroupAsync(name);

GetGroupAsync(GetGroupRequest, CallSettings)

public virtual Task<Group> GetGroupAsync(GetGroupRequest request, CallSettings callSettings = null)

Gets a single group.

Parameters
NameDescription
requestGetGroupRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskGroup

A Task containing the RPC response.

Example
// Create client
GroupServiceClient groupServiceClient = await GroupServiceClient.CreateAsync();
// Initialize request argument(s)
GetGroupRequest request = new GetGroupRequest
{
    GroupName = GroupName.FromProjectGroup("[PROJECT]", "[GROUP]"),
};
// Make the request
Group response = await groupServiceClient.GetGroupAsync(request);

GetGroupAsync(GetGroupRequest, CancellationToken)

public virtual Task<Group> GetGroupAsync(GetGroupRequest request, CancellationToken cancellationToken)

Gets a single group.

Parameters
NameDescription
requestGetGroupRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskGroup

A Task containing the RPC response.

Example
// Create client
GroupServiceClient groupServiceClient = await GroupServiceClient.CreateAsync();
// Initialize request argument(s)
GetGroupRequest request = new GetGroupRequest
{
    GroupName = GroupName.FromProjectGroup("[PROJECT]", "[GROUP]"),
};
// Make the request
Group response = await groupServiceClient.GetGroupAsync(request);

GetGroupAsync(GroupName, CallSettings)

public virtual Task<Group> GetGroupAsync(GroupName name, CallSettings callSettings = null)

Gets a single group.

Parameters
NameDescription
nameGroupName

Required. The group to retrieve. The format is:

projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID]

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskGroup

A Task containing the RPC response.

Example
// Create client
GroupServiceClient groupServiceClient = await GroupServiceClient.CreateAsync();
// Initialize request argument(s)
GroupName name = GroupName.FromProjectGroup("[PROJECT]", "[GROUP]");
// Make the request
Group response = await groupServiceClient.GetGroupAsync(name);

GetGroupAsync(GroupName, CancellationToken)

public virtual Task<Group> GetGroupAsync(GroupName name, CancellationToken cancellationToken)

Gets a single group.

Parameters
NameDescription
nameGroupName

Required. The group to retrieve. The format is:

projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID]

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskGroup

A Task containing the RPC response.

Example
// Create client
GroupServiceClient groupServiceClient = await GroupServiceClient.CreateAsync();
// Initialize request argument(s)
GroupName name = GroupName.FromProjectGroup("[PROJECT]", "[GROUP]");
// Make the request
Group response = await groupServiceClient.GetGroupAsync(name);

GetGroupAsync(string, CallSettings)

public virtual Task<Group> GetGroupAsync(string name, CallSettings callSettings = null)

Gets a single group.

Parameters
NameDescription
namestring

Required. The group to retrieve. The format is:

projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID]

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskGroup

A Task containing the RPC response.

Example
// Create client
GroupServiceClient groupServiceClient = await GroupServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/groups/[GROUP]";
// Make the request
Group response = await groupServiceClient.GetGroupAsync(name);

GetGroupAsync(string, CancellationToken)

public virtual Task<Group> GetGroupAsync(string name, CancellationToken cancellationToken)

Gets a single group.

Parameters
NameDescription
namestring

Required. The group to retrieve. The format is:

projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID]

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskGroup

A Task containing the RPC response.

Example
// Create client
GroupServiceClient groupServiceClient = await GroupServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/groups/[GROUP]";
// Make the request
Group response = await groupServiceClient.GetGroupAsync(name);

ListGroupMembers(IResourceName, string, int?, CallSettings)

public virtual PagedEnumerable<ListGroupMembersResponse, MonitoredResource> ListGroupMembers(IResourceName name, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists the monitored resources that are members of a group.

Parameters
NameDescription
nameIResourceName

Required. The group whose members are listed. The format is:

projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_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
PagedEnumerableListGroupMembersResponseMonitoredResource

A pageable sequence of MonitoredResource resources.

Example
// Create client
GroupServiceClient groupServiceClient = GroupServiceClient.Create();
// Initialize request argument(s)
IResourceName name = new UnparsedResourceName("a/wildcard/resource");
// Make the request
PagedEnumerable<ListGroupMembersResponse, MonitoredResource> response = groupServiceClient.ListGroupMembers(name);

// Iterate over all response items, lazily performing RPCs as required
foreach (MonitoredResource 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 (ListGroupMembersResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (MonitoredResource 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<MonitoredResource> 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 (MonitoredResource 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;

ListGroupMembers(GroupName, string, int?, CallSettings)

public virtual PagedEnumerable<ListGroupMembersResponse, MonitoredResource> ListGroupMembers(GroupName name, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists the monitored resources that are members of a group.

Parameters
NameDescription
nameGroupName

Required. The group whose members are listed. The format is:

projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_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
PagedEnumerableListGroupMembersResponseMonitoredResource

A pageable sequence of MonitoredResource resources.

Example
// Create client
GroupServiceClient groupServiceClient = GroupServiceClient.Create();
// Initialize request argument(s)
GroupName name = GroupName.FromProjectGroup("[PROJECT]", "[GROUP]");
// Make the request
PagedEnumerable<ListGroupMembersResponse, MonitoredResource> response = groupServiceClient.ListGroupMembers(name);

// Iterate over all response items, lazily performing RPCs as required
foreach (MonitoredResource 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 (ListGroupMembersResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (MonitoredResource 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<MonitoredResource> 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 (MonitoredResource 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;

ListGroupMembers(ListGroupMembersRequest, CallSettings)

public virtual PagedEnumerable<ListGroupMembersResponse, MonitoredResource> ListGroupMembers(ListGroupMembersRequest request, CallSettings callSettings = null)

Lists the monitored resources that are members of a group.

Parameters
NameDescription
requestListGroupMembersRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListGroupMembersResponseMonitoredResource

A pageable sequence of MonitoredResource resources.

Example
// Create client
GroupServiceClient groupServiceClient = GroupServiceClient.Create();
// Initialize request argument(s)
ListGroupMembersRequest request = new ListGroupMembersRequest
{
    Filter = "",
    Interval = new TimeInterval(),
    GroupName = GroupName.FromProjectGroup("[PROJECT]", "[GROUP]"),
};
// Make the request
PagedEnumerable<ListGroupMembersResponse, MonitoredResource> response = groupServiceClient.ListGroupMembers(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (MonitoredResource 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 (ListGroupMembersResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (MonitoredResource 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<MonitoredResource> 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 (MonitoredResource 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;

ListGroupMembers(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListGroupMembersResponse, MonitoredResource> ListGroupMembers(string name, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists the monitored resources that are members of a group.

Parameters
NameDescription
namestring

Required. The group whose members are listed. The format is:

projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_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
PagedEnumerableListGroupMembersResponseMonitoredResource

A pageable sequence of MonitoredResource resources.

Example
// Create client
GroupServiceClient groupServiceClient = GroupServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/groups/[GROUP]";
// Make the request
PagedEnumerable<ListGroupMembersResponse, MonitoredResource> response = groupServiceClient.ListGroupMembers(name);

// Iterate over all response items, lazily performing RPCs as required
foreach (MonitoredResource 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 (ListGroupMembersResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (MonitoredResource 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<MonitoredResource> 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 (MonitoredResource 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;

ListGroupMembersAsync(IResourceName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListGroupMembersResponse, MonitoredResource> ListGroupMembersAsync(IResourceName name, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists the monitored resources that are members of a group.

Parameters
NameDescription
nameIResourceName

Required. The group whose members are listed. The format is:

projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_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
PagedAsyncEnumerableListGroupMembersResponseMonitoredResource

A pageable asynchronous sequence of MonitoredResource resources.

Example
// Create client
GroupServiceClient groupServiceClient = await GroupServiceClient.CreateAsync();
// Initialize request argument(s)
IResourceName name = new UnparsedResourceName("a/wildcard/resource");
// Make the request
PagedAsyncEnumerable<ListGroupMembersResponse, MonitoredResource> response = groupServiceClient.ListGroupMembersAsync(name);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((MonitoredResource 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((ListGroupMembersResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (MonitoredResource 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<MonitoredResource> 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 (MonitoredResource 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;

ListGroupMembersAsync(GroupName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListGroupMembersResponse, MonitoredResource> ListGroupMembersAsync(GroupName name, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists the monitored resources that are members of a group.

Parameters
NameDescription
nameGroupName

Required. The group whose members are listed. The format is:

projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_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
PagedAsyncEnumerableListGroupMembersResponseMonitoredResource

A pageable asynchronous sequence of MonitoredResource resources.

Example
// Create client
GroupServiceClient groupServiceClient = await GroupServiceClient.CreateAsync();
// Initialize request argument(s)
GroupName name = GroupName.FromProjectGroup("[PROJECT]", "[GROUP]");
// Make the request
PagedAsyncEnumerable<ListGroupMembersResponse, MonitoredResource> response = groupServiceClient.ListGroupMembersAsync(name);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((MonitoredResource 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((ListGroupMembersResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (MonitoredResource 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<MonitoredResource> 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 (MonitoredResource 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;

ListGroupMembersAsync(ListGroupMembersRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListGroupMembersResponse, MonitoredResource> ListGroupMembersAsync(ListGroupMembersRequest request, CallSettings callSettings = null)

Lists the monitored resources that are members of a group.

Parameters
NameDescription
requestListGroupMembersRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListGroupMembersResponseMonitoredResource

A pageable asynchronous sequence of MonitoredResource resources.

Example
// Create client
GroupServiceClient groupServiceClient = await GroupServiceClient.CreateAsync();
// Initialize request argument(s)
ListGroupMembersRequest request = new ListGroupMembersRequest
{
    Filter = "",
    Interval = new TimeInterval(),
    GroupName = GroupName.FromProjectGroup("[PROJECT]", "[GROUP]"),
};
// Make the request
PagedAsyncEnumerable<ListGroupMembersResponse, MonitoredResource> response = groupServiceClient.ListGroupMembersAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((MonitoredResource 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((ListGroupMembersResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (MonitoredResource 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<MonitoredResource> 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 (MonitoredResource 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;

ListGroupMembersAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListGroupMembersResponse, MonitoredResource> ListGroupMembersAsync(string name, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists the monitored resources that are members of a group.

Parameters
NameDescription
namestring

Required. The group whose members are listed. The format is:

projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_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
PagedAsyncEnumerableListGroupMembersResponseMonitoredResource

A pageable asynchronous sequence of MonitoredResource resources.

Example
// Create client
GroupServiceClient groupServiceClient = await GroupServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/groups/[GROUP]";
// Make the request
PagedAsyncEnumerable<ListGroupMembersResponse, MonitoredResource> response = groupServiceClient.ListGroupMembersAsync(name);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((MonitoredResource 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((ListGroupMembersResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (MonitoredResource 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<MonitoredResource> 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 (MonitoredResource 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;

ListGroups(IResourceName, string, int?, CallSettings)

public virtual PagedEnumerable<ListGroupsResponse, Group> ListGroups(IResourceName name, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists the existing groups.

Parameters
NameDescription
nameIResourceName

Required. The project whose groups are to be listed. The format is:

projects/[PROJECT_ID_OR_NUMBER]

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
PagedEnumerableListGroupsResponseGroup

A pageable sequence of Group resources.

Example
// Create client
GroupServiceClient groupServiceClient = GroupServiceClient.Create();
// Initialize request argument(s)
IResourceName name = new UnparsedResourceName("a/wildcard/resource");
// Make the request
PagedEnumerable<ListGroupsResponse, Group> response = groupServiceClient.ListGroups(name);

// Iterate over all response items, lazily performing RPCs as required
foreach (Group 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 (ListGroupsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Group 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<Group> 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 (Group 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;

ListGroups(FolderName, string, int?, CallSettings)

public virtual PagedEnumerable<ListGroupsResponse, Group> ListGroups(FolderName name, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists the existing groups.

Parameters
NameDescription
nameFolderName

Required. The project whose groups are to be listed. The format is:

projects/[PROJECT_ID_OR_NUMBER]

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
PagedEnumerableListGroupsResponseGroup

A pageable sequence of Group resources.

Example
// Create client
GroupServiceClient groupServiceClient = GroupServiceClient.Create();
// Initialize request argument(s)
FolderName name = FolderName.FromFolder("[FOLDER]");
// Make the request
PagedEnumerable<ListGroupsResponse, Group> response = groupServiceClient.ListGroups(name);

// Iterate over all response items, lazily performing RPCs as required
foreach (Group 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 (ListGroupsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Group 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<Group> 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 (Group 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;

ListGroups(OrganizationName, string, int?, CallSettings)

public virtual PagedEnumerable<ListGroupsResponse, Group> ListGroups(OrganizationName name, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists the existing groups.

Parameters
NameDescription
nameOrganizationName

Required. The project whose groups are to be listed. The format is:

projects/[PROJECT_ID_OR_NUMBER]

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
PagedEnumerableListGroupsResponseGroup

A pageable sequence of Group resources.

Example
// Create client
GroupServiceClient groupServiceClient = GroupServiceClient.Create();
// Initialize request argument(s)
OrganizationName name = OrganizationName.FromOrganization("[ORGANIZATION]");
// Make the request
PagedEnumerable<ListGroupsResponse, Group> response = groupServiceClient.ListGroups(name);

// Iterate over all response items, lazily performing RPCs as required
foreach (Group 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 (ListGroupsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Group 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<Group> 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 (Group 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;

ListGroups(ProjectName, string, int?, CallSettings)

public virtual PagedEnumerable<ListGroupsResponse, Group> ListGroups(ProjectName name, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists the existing groups.

Parameters
NameDescription
nameProjectName

Required. The project whose groups are to be listed. The format is:

projects/[PROJECT_ID_OR_NUMBER]

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
PagedEnumerableListGroupsResponseGroup

A pageable sequence of Group resources.

Example
// Create client
GroupServiceClient groupServiceClient = GroupServiceClient.Create();
// Initialize request argument(s)
ProjectName name = ProjectName.FromProject("[PROJECT]");
// Make the request
PagedEnumerable<ListGroupsResponse, Group> response = groupServiceClient.ListGroups(name);

// Iterate over all response items, lazily performing RPCs as required
foreach (Group 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 (ListGroupsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Group 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<Group> 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 (Group 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;

ListGroups(ListGroupsRequest, CallSettings)

public virtual PagedEnumerable<ListGroupsResponse, Group> ListGroups(ListGroupsRequest request, CallSettings callSettings = null)

Lists the existing groups.

Parameters
NameDescription
requestListGroupsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListGroupsResponseGroup

A pageable sequence of Group resources.

Example
GroupServiceClient client = GroupServiceClient.Create();
ProjectName projectName = ProjectName.FromProject(projectId);
PagedEnumerable<ListGroupsResponse, Group> groups = client.ListGroups(projectName);
foreach (Group group in groups.Take(10))
{
    Console.WriteLine($"{group.Name}: {group.DisplayName}");
}

ListGroups(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListGroupsResponse, Group> ListGroups(string name, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists the existing groups.

Parameters
NameDescription
namestring

Required. The project whose groups are to be listed. The format is:

projects/[PROJECT_ID_OR_NUMBER]

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
PagedEnumerableListGroupsResponseGroup

A pageable sequence of Group resources.

Example
// Create client
GroupServiceClient groupServiceClient = GroupServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]";
// Make the request
PagedEnumerable<ListGroupsResponse, Group> response = groupServiceClient.ListGroups(name);

// Iterate over all response items, lazily performing RPCs as required
foreach (Group 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 (ListGroupsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Group 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<Group> 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 (Group 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;

ListGroupsAsync(IResourceName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListGroupsResponse, Group> ListGroupsAsync(IResourceName name, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists the existing groups.

Parameters
NameDescription
nameIResourceName

Required. The project whose groups are to be listed. The format is:

projects/[PROJECT_ID_OR_NUMBER]

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
PagedAsyncEnumerableListGroupsResponseGroup

A pageable asynchronous sequence of Group resources.

Example
// Create client
GroupServiceClient groupServiceClient = await GroupServiceClient.CreateAsync();
// Initialize request argument(s)
IResourceName name = new UnparsedResourceName("a/wildcard/resource");
// Make the request
PagedAsyncEnumerable<ListGroupsResponse, Group> response = groupServiceClient.ListGroupsAsync(name);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Group 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((ListGroupsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Group 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<Group> 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 (Group 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;

ListGroupsAsync(FolderName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListGroupsResponse, Group> ListGroupsAsync(FolderName name, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists the existing groups.

Parameters
NameDescription
nameFolderName

Required. The project whose groups are to be listed. The format is:

projects/[PROJECT_ID_OR_NUMBER]

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
PagedAsyncEnumerableListGroupsResponseGroup

A pageable asynchronous sequence of Group resources.

Example
// Create client
GroupServiceClient groupServiceClient = await GroupServiceClient.CreateAsync();
// Initialize request argument(s)
FolderName name = FolderName.FromFolder("[FOLDER]");
// Make the request
PagedAsyncEnumerable<ListGroupsResponse, Group> response = groupServiceClient.ListGroupsAsync(name);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Group 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((ListGroupsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Group 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<Group> 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 (Group 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;

ListGroupsAsync(OrganizationName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListGroupsResponse, Group> ListGroupsAsync(OrganizationName name, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists the existing groups.

Parameters
NameDescription
nameOrganizationName

Required. The project whose groups are to be listed. The format is:

projects/[PROJECT_ID_OR_NUMBER]

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
PagedAsyncEnumerableListGroupsResponseGroup

A pageable asynchronous sequence of Group resources.

Example
// Create client
GroupServiceClient groupServiceClient = await GroupServiceClient.CreateAsync();
// Initialize request argument(s)
OrganizationName name = OrganizationName.FromOrganization("[ORGANIZATION]");
// Make the request
PagedAsyncEnumerable<ListGroupsResponse, Group> response = groupServiceClient.ListGroupsAsync(name);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Group 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((ListGroupsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Group 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<Group> 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 (Group 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;

ListGroupsAsync(ProjectName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListGroupsResponse, Group> ListGroupsAsync(ProjectName name, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists the existing groups.

Parameters
NameDescription
nameProjectName

Required. The project whose groups are to be listed. The format is:

projects/[PROJECT_ID_OR_NUMBER]

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
PagedAsyncEnumerableListGroupsResponseGroup

A pageable asynchronous sequence of Group resources.

Example
// Create client
GroupServiceClient groupServiceClient = await GroupServiceClient.CreateAsync();
// Initialize request argument(s)
ProjectName name = ProjectName.FromProject("[PROJECT]");
// Make the request
PagedAsyncEnumerable<ListGroupsResponse, Group> response = groupServiceClient.ListGroupsAsync(name);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Group 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((ListGroupsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Group 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<Group> 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 (Group 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;

ListGroupsAsync(ListGroupsRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListGroupsResponse, Group> ListGroupsAsync(ListGroupsRequest request, CallSettings callSettings = null)

Lists the existing groups.

Parameters
NameDescription
requestListGroupsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListGroupsResponseGroup

A pageable asynchronous sequence of Group resources.

Example
// Create client
GroupServiceClient groupServiceClient = await GroupServiceClient.CreateAsync();
// Initialize request argument(s)
ListGroupsRequest request = new ListGroupsRequest
{
    ChildrenOfGroupAsGroupName = GroupName.FromProjectGroup("[PROJECT]", "[GROUP]"),
    ProjectName = ProjectName.FromProject("[PROJECT]"),
};
// Make the request
PagedAsyncEnumerable<ListGroupsResponse, Group> response = groupServiceClient.ListGroupsAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Group 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((ListGroupsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Group 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<Group> 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 (Group 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;

ListGroupsAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListGroupsResponse, Group> ListGroupsAsync(string name, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists the existing groups.

Parameters
NameDescription
namestring

Required. The project whose groups are to be listed. The format is:

projects/[PROJECT_ID_OR_NUMBER]

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
PagedAsyncEnumerableListGroupsResponseGroup

A pageable asynchronous sequence of Group resources.

Example
// Create client
GroupServiceClient groupServiceClient = await GroupServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]";
// Make the request
PagedAsyncEnumerable<ListGroupsResponse, Group> response = groupServiceClient.ListGroupsAsync(name);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Group 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((ListGroupsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Group 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<Group> 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 (Group 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.

UpdateGroup(Group, CallSettings)

public virtual Group UpdateGroup(Group group, CallSettings callSettings = null)

Updates an existing group. You can change any group attributes except name.

Parameters
NameDescription
groupGroup

Required. The new definition of the group. All fields of the existing group, excepting name, are replaced with the corresponding fields of this group.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Group

The RPC response.

Example
// Create client
GroupServiceClient groupServiceClient = GroupServiceClient.Create();
// Initialize request argument(s)
Group group = new Group();
// Make the request
Group response = groupServiceClient.UpdateGroup(group);

UpdateGroup(UpdateGroupRequest, CallSettings)

public virtual Group UpdateGroup(UpdateGroupRequest request, CallSettings callSettings = null)

Updates an existing group. You can change any group attributes except name.

Parameters
NameDescription
requestUpdateGroupRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Group

The RPC response.

Example
// Create client
GroupServiceClient groupServiceClient = GroupServiceClient.Create();
// Initialize request argument(s)
UpdateGroupRequest request = new UpdateGroupRequest
{
    Group = new Group(),
    ValidateOnly = false,
};
// Make the request
Group response = groupServiceClient.UpdateGroup(request);

UpdateGroupAsync(Group, CallSettings)

public virtual Task<Group> UpdateGroupAsync(Group group, CallSettings callSettings = null)

Updates an existing group. You can change any group attributes except name.

Parameters
NameDescription
groupGroup

Required. The new definition of the group. All fields of the existing group, excepting name, are replaced with the corresponding fields of this group.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskGroup

A Task containing the RPC response.

Example
// Create client
GroupServiceClient groupServiceClient = await GroupServiceClient.CreateAsync();
// Initialize request argument(s)
Group group = new Group();
// Make the request
Group response = await groupServiceClient.UpdateGroupAsync(group);

UpdateGroupAsync(Group, CancellationToken)

public virtual Task<Group> UpdateGroupAsync(Group group, CancellationToken cancellationToken)

Updates an existing group. You can change any group attributes except name.

Parameters
NameDescription
groupGroup

Required. The new definition of the group. All fields of the existing group, excepting name, are replaced with the corresponding fields of this group.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskGroup

A Task containing the RPC response.

Example
// Create client
GroupServiceClient groupServiceClient = await GroupServiceClient.CreateAsync();
// Initialize request argument(s)
Group group = new Group();
// Make the request
Group response = await groupServiceClient.UpdateGroupAsync(group);

UpdateGroupAsync(UpdateGroupRequest, CallSettings)

public virtual Task<Group> UpdateGroupAsync(UpdateGroupRequest request, CallSettings callSettings = null)

Updates an existing group. You can change any group attributes except name.

Parameters
NameDescription
requestUpdateGroupRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskGroup

A Task containing the RPC response.

Example
// Create client
GroupServiceClient groupServiceClient = await GroupServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateGroupRequest request = new UpdateGroupRequest
{
    Group = new Group(),
    ValidateOnly = false,
};
// Make the request
Group response = await groupServiceClient.UpdateGroupAsync(request);

UpdateGroupAsync(UpdateGroupRequest, CancellationToken)

public virtual Task<Group> UpdateGroupAsync(UpdateGroupRequest request, CancellationToken cancellationToken)

Updates an existing group. You can change any group attributes except name.

Parameters
NameDescription
requestUpdateGroupRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskGroup

A Task containing the RPC response.

Example
// Create client
GroupServiceClient groupServiceClient = await GroupServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateGroupRequest request = new UpdateGroupRequest
{
    Group = new Group(),
    ValidateOnly = false,
};
// Make the request
Group response = await groupServiceClient.UpdateGroupAsync(request);