public abstract class GroupServiceClient
Reference documentation and code samples for the Google Cloud Monitoring v3 API class GroupServiceClient.
GroupService client wrapper, for convenient use.
Derived Types
Namespace
Google.Cloud.Monitoring.V3Assembly
Google.Cloud.Monitoring.V3.dll
Remarks
The Group API lets you inspect and manage your groups.
A group is a named filter that is used to identify a collection of monitored resources. Groups are typically used to mirror the physical and/or logical topology of the environment. Because group membership is computed dynamically, monitored resources that are started in the future are automatically placed in matching groups. By using a group to name monitored resources in, for example, an alert policy, the target of that alert policy is updated automatically as monitored resources are added and removed from the infrastructure.
Properties
DefaultEndpoint
public static string DefaultEndpoint { get; }
The default endpoint for the GroupService service, which is a host of "monitoring.googleapis.com" and a port of 443.
Property Value | |
---|---|
Type | Description |
String |
DefaultScopes
public static IReadOnlyList<string> DefaultScopes { get; }
The default GroupService scopes.
Property Value | |
---|---|
Type | Description |
IReadOnlyList<String> |
The default GroupService scopes are:
GrpcClient
public virtual GroupService.GroupServiceClient GrpcClient { get; }
The underlying gRPC GroupService client
Property Value | |
---|---|
Type | Description |
GroupService.GroupServiceClient |
ServiceMetadata
public static ServiceMetadata ServiceMetadata { get; }
The service metadata associated with this client type.
Property Value | |
---|---|
Type | Description |
ServiceMetadata |
Methods
Create()
public static GroupServiceClient Create()
Synchronously creates a GroupServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use GroupServiceClientBuilder.
Returns | |
---|---|
Type | Description |
GroupServiceClient | The created GroupServiceClient. |
CreateAsync(CancellationToken)
public static Task<GroupServiceClient> CreateAsync(CancellationToken cancellationToken = default(CancellationToken))
Asynchronously creates a GroupServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use GroupServiceClientBuilder.
Parameter | |
---|---|
Name | Description |
cancellationToken | CancellationToken The CancellationToken to use while creating the client. |
Returns | |
---|---|
Type | Description |
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.
Parameters | |
---|---|
Name | Description |
name | IResourceName Required. The project in which to create the group. The format is: projects/[PROJECT_ID_OR_NUMBER] |
group | Group Required. A group definition. It is an error to define the |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Group | The RPC response. |
// Create client
GroupServiceClient groupServiceClient = GroupServiceClient.Create();
// Initialize request argument(s)
IResourceName name = new UnparsedResourceName("a/wildcard/resource");
Group group = new Group();
// Make the request
Group response = groupServiceClient.CreateGroup(name, group);
CreateGroup(FolderName, Group, CallSettings)
public virtual Group CreateGroup(FolderName name, Group group, CallSettings callSettings = null)
Creates a new group.
Parameters | |
---|---|
Name | Description |
name | FolderName Required. The project in which to create the group. The format is: projects/[PROJECT_ID_OR_NUMBER] |
group | Group Required. A group definition. It is an error to define the |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Group | The RPC response. |
// Create client
GroupServiceClient groupServiceClient = GroupServiceClient.Create();
// Initialize request argument(s)
FolderName name = FolderName.FromFolder("[FOLDER]");
Group group = new Group();
// Make the request
Group response = groupServiceClient.CreateGroup(name, group);
CreateGroup(OrganizationName, Group, CallSettings)
public virtual Group CreateGroup(OrganizationName name, Group group, CallSettings callSettings = null)
Creates a new group.
Parameters | |
---|---|
Name | Description |
name | OrganizationName Required. The project in which to create the group. The format is: projects/[PROJECT_ID_OR_NUMBER] |
group | Group Required. A group definition. It is an error to define the |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Group | The RPC response. |
// Create client
GroupServiceClient groupServiceClient = GroupServiceClient.Create();
// Initialize request argument(s)
OrganizationName name = OrganizationName.FromOrganization("[ORGANIZATION]");
Group group = new Group();
// Make the request
Group response = groupServiceClient.CreateGroup(name, group);
CreateGroup(ProjectName, Group, CallSettings)
public virtual Group CreateGroup(ProjectName name, Group group, CallSettings callSettings = null)
Creates a new group.
Parameters | |
---|---|
Name | Description |
name | ProjectName Required. The project in which to create the group. The format is: projects/[PROJECT_ID_OR_NUMBER] |
group | Group Required. A group definition. It is an error to define the |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Group | The RPC response. |
// Create client
GroupServiceClient groupServiceClient = GroupServiceClient.Create();
// Initialize request argument(s)
ProjectName name = ProjectName.FromProject("[PROJECT]");
Group group = new Group();
// Make the request
Group response = groupServiceClient.CreateGroup(name, group);
CreateGroup(CreateGroupRequest, CallSettings)
public virtual Group CreateGroup(CreateGroupRequest request, CallSettings callSettings = null)
Creates a new group.
Parameters | |
---|---|
Name | Description |
request | CreateGroupRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Group | The RPC response. |
// Create client
GroupServiceClient groupServiceClient = GroupServiceClient.Create();
// Initialize request argument(s)
CreateGroupRequest request = new CreateGroupRequest
{
Group = new Group(),
ValidateOnly = false,
ProjectName = ProjectName.FromProject("[PROJECT]"),
};
// Make the request
Group response = groupServiceClient.CreateGroup(request);
CreateGroup(String, Group, CallSettings)
public virtual Group CreateGroup(string name, Group group, CallSettings callSettings = null)
Creates a new group.
Parameters | |
---|---|
Name | Description |
name | String Required. The project in which to create the group. The format is: projects/[PROJECT_ID_OR_NUMBER] |
group | Group Required. A group definition. It is an error to define the |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Group | The RPC response. |
// Create client
GroupServiceClient groupServiceClient = GroupServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]";
Group group = new Group();
// Make the request
Group response = groupServiceClient.CreateGroup(name, group);
CreateGroupAsync(IResourceName, Group, CallSettings)
public virtual Task<Group> CreateGroupAsync(IResourceName name, Group group, CallSettings callSettings = null)
Creates a new group.
Parameters | |
---|---|
Name | Description |
name | IResourceName Required. The project in which to create the group. The format is: projects/[PROJECT_ID_OR_NUMBER] |
group | Group Required. A group definition. It is an error to define the |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
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.
Parameters | |
---|---|
Name | Description |
name | IResourceName Required. The project in which to create the group. The format is: projects/[PROJECT_ID_OR_NUMBER] |
group | Group Required. A group definition. It is an error to define the |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
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.
Parameters | |
---|---|
Name | Description |
name | FolderName Required. The project in which to create the group. The format is: projects/[PROJECT_ID_OR_NUMBER] |
group | Group Required. A group definition. It is an error to define the |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
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.
Parameters | |
---|---|
Name | Description |
name | FolderName Required. The project in which to create the group. The format is: projects/[PROJECT_ID_OR_NUMBER] |
group | Group Required. A group definition. It is an error to define the |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
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.
Parameters | |
---|---|
Name | Description |
name | OrganizationName Required. The project in which to create the group. The format is: projects/[PROJECT_ID_OR_NUMBER] |
group | Group Required. A group definition. It is an error to define the |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
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.
Parameters | |
---|---|
Name | Description |
name | OrganizationName Required. The project in which to create the group. The format is: projects/[PROJECT_ID_OR_NUMBER] |
group | Group Required. A group definition. It is an error to define the |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
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.
Parameters | |
---|---|
Name | Description |
name | ProjectName Required. The project in which to create the group. The format is: projects/[PROJECT_ID_OR_NUMBER] |
group | Group Required. A group definition. It is an error to define the |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
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.
Parameters | |
---|---|
Name | Description |
name | ProjectName Required. The project in which to create the group. The format is: projects/[PROJECT_ID_OR_NUMBER] |
group | Group Required. A group definition. It is an error to define the |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
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.
Parameters | |
---|---|
Name | Description |
request | CreateGroupRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
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.
Parameters | |
---|---|
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. |
Returns | |
---|---|
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.
Parameters | |
---|---|
Name | Description |
name | String Required. The project in which to create the group. The format is: projects/[PROJECT_ID_OR_NUMBER] |
group | Group Required. A group definition. It is an error to define the |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
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.
Parameters | |
---|---|
Name | Description |
name | String Required. The project in which to create the group. The format is: projects/[PROJECT_ID_OR_NUMBER] |
group | Group Required. A group definition. It is an error to define the |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
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.
Parameters | |
---|---|
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.
Parameters | |
---|---|
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.
Parameters | |
---|---|
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.
Parameters | |
---|---|
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.
Parameters | |
---|---|
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. |
Returns | |
---|---|
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.
Parameters | |
---|---|
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. |
Returns | |
---|---|
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.
Parameters | |
---|---|
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. |
Returns | |
---|---|
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.
Parameters | |
---|---|
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. |
Returns | |
---|---|
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.
Parameters | |
---|---|
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. |
Returns | |
---|---|
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.
Parameters | |
---|---|
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. |
Returns | |
---|---|
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.
Parameters | |
---|---|
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. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
name | String 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. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
name | IResourceName Required. The group to retrieve. The format is: projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Group | The RPC response. |
// Create client
GroupServiceClient groupServiceClient = GroupServiceClient.Create();
// Initialize request argument(s)
IResourceName name = new UnparsedResourceName("a/wildcard/resource");
// 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 | |
---|---|
Name | Description |
request | GetGroupRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Group | The RPC response. |
// Create client
GroupServiceClient groupServiceClient = GroupServiceClient.Create();
// Initialize request argument(s)
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 | |
---|---|
Name | Description |
name | GroupName Required. The group to retrieve. The format is: projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Group | The RPC response. |
// Create client
GroupServiceClient groupServiceClient = GroupServiceClient.Create();
// Initialize request argument(s)
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 | |
---|---|
Name | Description |
name | String Required. The group to retrieve. The format is: projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Group | The RPC response. |
// Create client
GroupServiceClient groupServiceClient = GroupServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/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 | |
---|---|
Name | Description |
name | IResourceName Required. The group to retrieve. The format is: projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
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");
// 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 | |
---|---|
Name | Description |
name | IResourceName Required. The group to retrieve. The format is: projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
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");
// 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 | |
---|---|
Name | Description |
request | GetGroupRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Group> | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request | GetGroupRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Group> | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
name | GroupName Required. The group to retrieve. The format is: projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Group> | 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
Group response = await groupServiceClient.GetGroupAsync(name);
GetGroupAsync(GroupName, CancellationToken)
public virtual Task<Group> GetGroupAsync(GroupName name, CancellationToken cancellationToken)
Gets a single group.
Parameters | |
---|---|
Name | Description |
name | GroupName Required. The group to retrieve. The format is: projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Group> | 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
Group response = await groupServiceClient.GetGroupAsync(name);
GetGroupAsync(String, CallSettings)
public virtual Task<Group> GetGroupAsync(string name, CallSettings callSettings = null)
Gets a single group.
Parameters | |
---|---|
Name | Description |
name | String Required. The group to retrieve. The format is: projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
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]/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 | |
---|---|
Name | Description |
name | String Required. The group to retrieve. The format is: projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
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]/groups/[GROUP]";
// Make the request
Group response = await groupServiceClient.GetGroupAsync(name);
ListGroupMembers(IResourceName, String, Nullable<Int32>, 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 | |
---|---|
Name | Description |
name | IResourceName Required. The group whose members are listed. The format is: projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListGroupMembersResponse, MonitoredResource> | A pageable sequence of MonitoredResource resources. |
// 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, Nullable<Int32>, 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 | |
---|---|
Name | Description |
name | GroupName Required. The group whose members are listed. The format is: projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListGroupMembersResponse, MonitoredResource> | A pageable sequence of MonitoredResource resources. |
// 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 | |
---|---|
Name | Description |
request | ListGroupMembersRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListGroupMembersResponse, MonitoredResource> | A pageable sequence of MonitoredResource resources. |
// 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, Nullable<Int32>, 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 | |
---|---|
Name | Description |
name | String Required. The group whose members are listed. The format is: projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListGroupMembersResponse, MonitoredResource> | A pageable sequence of MonitoredResource resources. |
// 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, Nullable<Int32>, 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 | |
---|---|
Name | Description |
name | IResourceName Required. The group whose members are listed. The format is: projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListGroupMembersResponse, MonitoredResource> | A pageable asynchronous sequence of MonitoredResource resources. |
// 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, Nullable<Int32>, 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 | |
---|---|
Name | Description |
name | GroupName Required. The group whose members are listed. The format is: projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListGroupMembersResponse, MonitoredResource> | A pageable asynchronous sequence of MonitoredResource resources. |
// 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 | |
---|---|
Name | Description |
request | ListGroupMembersRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListGroupMembersResponse, MonitoredResource> | A pageable asynchronous sequence of MonitoredResource resources. |
// 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, Nullable<Int32>, 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 | |
---|---|
Name | Description |
name | String Required. The group whose members are listed. The format is: projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListGroupMembersResponse, MonitoredResource> | A pageable asynchronous sequence of MonitoredResource resources. |
// 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, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ListGroupsResponse, Group> ListGroups(IResourceName name, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists the existing groups.
Parameters | |
---|---|
Name | Description |
name | IResourceName Required. The project whose groups are to be listed. The format is: projects/[PROJECT_ID_OR_NUMBER] |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListGroupsResponse, Group> | A pageable sequence of Group resources. |
// 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, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ListGroupsResponse, Group> ListGroups(FolderName name, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists the existing groups.
Parameters | |
---|---|
Name | Description |
name | FolderName Required. The project whose groups are to be listed. The format is: projects/[PROJECT_ID_OR_NUMBER] |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListGroupsResponse, Group> | A pageable sequence of Group resources. |
// 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, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ListGroupsResponse, Group> ListGroups(OrganizationName name, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists the existing groups.
Parameters | |
---|---|
Name | Description |
name | OrganizationName Required. The project whose groups are to be listed. The format is: projects/[PROJECT_ID_OR_NUMBER] |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListGroupsResponse, Group> | A pageable sequence of Group resources. |
// 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, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ListGroupsResponse, Group> ListGroups(ProjectName name, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists the existing groups.
Parameters | |
---|---|
Name | Description |
name | ProjectName Required. The project whose groups are to be listed. The format is: projects/[PROJECT_ID_OR_NUMBER] |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListGroupsResponse, Group> | A pageable sequence of Group resources. |
// 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 | |
---|---|
Name | Description |
request | ListGroupsRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListGroupsResponse, Group> | A pageable sequence of Group resources. |
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, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ListGroupsResponse, Group> ListGroups(string name, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists the existing groups.
Parameters | |
---|---|
Name | Description |
name | String Required. The project whose groups are to be listed. The format is: projects/[PROJECT_ID_OR_NUMBER] |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListGroupsResponse, Group> | A pageable sequence of Group resources. |
// 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, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ListGroupsResponse, Group> ListGroupsAsync(IResourceName name, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists the existing groups.
Parameters | |
---|---|
Name | Description |
name | IResourceName Required. The project whose groups are to be listed. The format is: projects/[PROJECT_ID_OR_NUMBER] |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListGroupsResponse, Group> | A pageable asynchronous sequence of Group resources. |
// 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, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ListGroupsResponse, Group> ListGroupsAsync(FolderName name, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists the existing groups.
Parameters | |
---|---|
Name | Description |
name | FolderName Required. The project whose groups are to be listed. The format is: projects/[PROJECT_ID_OR_NUMBER] |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListGroupsResponse, Group> | A pageable asynchronous sequence of Group resources. |
// 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, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ListGroupsResponse, Group> ListGroupsAsync(OrganizationName name, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists the existing groups.
Parameters | |
---|---|
Name | Description |
name | OrganizationName Required. The project whose groups are to be listed. The format is: projects/[PROJECT_ID_OR_NUMBER] |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListGroupsResponse, Group> | A pageable asynchronous sequence of Group resources. |
// 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, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ListGroupsResponse, Group> ListGroupsAsync(ProjectName name, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists the existing groups.
Parameters | |
---|---|
Name | Description |
name | ProjectName Required. The project whose groups are to be listed. The format is: projects/[PROJECT_ID_OR_NUMBER] |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListGroupsResponse, Group> | A pageable asynchronous sequence of Group resources. |
// 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 | |
---|---|
Name | Description |
request | ListGroupsRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListGroupsResponse, Group> | A pageable asynchronous sequence of Group resources. |
// 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, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ListGroupsResponse, Group> ListGroupsAsync(string name, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists the existing groups.
Parameters | |
---|---|
Name | Description |
name | String Required. The project whose groups are to be listed. The format is: projects/[PROJECT_ID_OR_NUMBER] |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListGroupsResponse, Group> | A pageable asynchronous sequence of Group resources. |
// 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 | |
---|---|
Type | Description |
Task | A task representing the asynchronous shutdown operation. |
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 | |
---|---|
Name | Description |
group | Group Required. The new definition of the group. All fields of the existing group,
excepting |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Group | The RPC response. |
// Create client
GroupServiceClient groupServiceClient = GroupServiceClient.Create();
// Initialize request argument(s)
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 | |
---|---|
Name | Description |
request | UpdateGroupRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Group | The RPC response. |
// Create client
GroupServiceClient groupServiceClient = GroupServiceClient.Create();
// Initialize request argument(s)
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 | |
---|---|
Name | Description |
group | Group Required. The new definition of the group. All fields of the existing group,
excepting |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Group> | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
group | Group Required. The new definition of the group. All fields of the existing group,
excepting |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Group> | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request | UpdateGroupRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Group> | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request | UpdateGroupRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Group> | A Task containing the RPC response. |
// 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);