Application Load Balancer API, gRPC: TargetGroupService
A set of methods for managing target groups.
Call | Description |
---|---|
Get | Returns the specified target group. |
List | Lists target groups in the specified folder. |
Create | Creates a target group in the specified folder. |
Update | Updates the specified target group. |
Delete | Deletes the specified target group. |
AddTargets | Adds targets to the specified target group. |
RemoveTargets | Removes targets from the specified target group. |
ListOperations | Lists operations for the specified target group. |
Calls TargetGroupService
Get
Returns the specified target group.
To get the list of all available target groups, make a List request.
rpc Get (GetTargetGroupRequest) returns (TargetGroup)
GetTargetGroupRequest
Field | Description |
---|---|
target_group_id | string Required. ID of the target group to return. To get the target group ID, make a TargetGroupService.List request. |
TargetGroup
Field | Description |
---|---|
id | string ID of the target group. Generated at creation time. |
name | string Name of the target group. The name is unique within the folder. |
description | string Description of the target group. |
folder_id | string ID of the folder that the target group belongs to. |
labels | map<string,string> Target group labels as key:value pairs. For details about the concept, see documentation. |
targets[] | Target List of targets in the target group. |
created_at | google.protobuf.Timestamp Creation timestamp. |
Target
Field | Description |
---|---|
address_type | oneof: ip_address Reference to the target. As of now, targets must only be referred to by their IP addresses. |
ip_address | string IP address of the target. |
subnet_id | string ID of the subnet that the target is connected to. |
private_ipv4_address | bool If set, will not require subnet_id to validate the target. Instead, the address should belong to one of the following ranges: 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16 Only one of subnet_id or private_ipv4_address should be set. |
List
Lists target groups in the specified folder.
rpc List (ListTargetGroupsRequest) returns (ListTargetGroupsResponse)
ListTargetGroupsRequest
Field | Description |
---|---|
folder_id | string Required. ID of the folder to list target groups in. To get the folder ID, make a resourcemanager.v1.FolderService.List request. |
page_size | int64 The maximum number of results per page to return. If the number of available results is larger than page_size , the service returns a ListTargetGroupsResponse.next_page_token that can be used to get the next page of results in subsequent list requests. Default value: 100. Acceptable values are 0 to 1000, inclusive. |
page_token | string Page token. To get the next page of results, set page_token to the ListTargetGroupsResponse.next_page_token returned by a previous list request. The maximum string length in characters is 100. |
filter | string A filter expression that filters target groups listed in the response. The expression must specify:
name=my-target-group . The maximum string length in characters is 1000. |
ListTargetGroupsResponse
Field | Description |
---|---|
target_groups[] | TargetGroup List of target groups in the specified folder. |
next_page_token | string Token for getting the next page of the list. If the number of results is greater than the specified ListTargetGroupsRequest.page_size, use next_page_token as the value for the ListTargetGroupsRequest.page_token parameter in the next list request. Each subsequent page will have its own next_page_token to continue paging through the results. |
TargetGroup
Field | Description |
---|---|
id | string ID of the target group. Generated at creation time. |
name | string Name of the target group. The name is unique within the folder. |
description | string Description of the target group. |
folder_id | string ID of the folder that the target group belongs to. |
labels | map<string,string> Target group labels as key:value pairs. For details about the concept, see documentation. |
targets[] | Target List of targets in the target group. |
created_at | google.protobuf.Timestamp Creation timestamp. |
Target
Field | Description |
---|---|
address_type | oneof: ip_address Reference to the target. As of now, targets must only be referred to by their IP addresses. |
ip_address | string IP address of the target. |
subnet_id | string ID of the subnet that the target is connected to. |
private_ipv4_address | bool If set, will not require subnet_id to validate the target. Instead, the address should belong to one of the following ranges: 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16 Only one of subnet_id or private_ipv4_address should be set. |
Create
Creates a target group in the specified folder.
rpc Create (CreateTargetGroupRequest) returns (operation.Operation)
Metadata and response of Operation:
Operation.metadata:CreateTargetGroupMetadata
Operation.response:TargetGroup
CreateTargetGroupRequest
Field | Description |
---|---|
folder_id | string Required. ID of the folder to create a target group in. To get the folder ID, make a resourcemanager.v1.FolderService.List request. |
name | string Name of the target group. The name must be unique within the folder. Value must match the regular expression ([a-z]([-a-z0-9]{0,61}[a-z0-9])?)? . |
description | string Description of the target group. The maximum string length in characters is 256. |
labels | map<string,string> Target group labels as key:value pairs. For details about the concept, see documentation. No more than 64 per resource. The maximum string length in characters for each value is 63. Each value must match the regular expression [-_./\\@0-9a-z]* . The string length in characters for each key must be 1-63. Each key must match the regular expression [a-z][-_./\\@0-9a-z]* . |
targets[] | Target List of targets in the target group. |
Target
Field | Description |
---|---|
address_type | oneof: ip_address Reference to the target. As of now, targets must only be referred to by their IP addresses. |
ip_address | string IP address of the target. |
subnet_id | string ID of the subnet that the target is connected to. |
private_ipv4_address | bool If set, will not require subnet_id to validate the target. Instead, the address should belong to one of the following ranges: 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16 Only one of subnet_id or private_ipv4_address should be set. |
Operation
Field | Description |
---|---|
id | string ID of the operation. |
description | string Description of the operation. 0-256 characters long. |
created_at | google.protobuf.Timestamp Creation timestamp. |
created_by | string ID of the user or service account who initiated the operation. |
modified_at | google.protobuf.Timestamp The time when the Operation resource was last modified. |
done | bool If the value is false , it means the operation is still in progress. If true , the operation is completed, and either error or response is available. |
metadata | google.protobuf.Any Service-specific metadata associated with the operation. It typically contains the ID of the target resource that the operation is performed on. Any method that returns a long-running operation should document the metadata type, if any. |
result | oneof: error or response The operation result. If done == false and there was no failure detected, neither error nor response is set. If done == false and there was a failure detected, error is set. If done == true , exactly one of error or response is set. |
error | google.rpc.Status The error result of the operation in case of failure or cancellation. |
response | google.protobuf.Any if operation finished successfully. |
CreateTargetGroupMetadata
Field | Description |
---|---|
target_group_id | string ID of the target group that is being created. |
TargetGroup
Field | Description |
---|---|
id | string ID of the target group. Generated at creation time. |
name | string Name of the target group. The name is unique within the folder. |
description | string Description of the target group. |
folder_id | string ID of the folder that the target group belongs to. |
labels | map<string,string> Target group labels as key:value pairs. For details about the concept, see documentation. |
targets[] | Target List of targets in the target group. |
created_at | google.protobuf.Timestamp Creation timestamp. |
Update
Updates the specified target group.
rpc Update (UpdateTargetGroupRequest) returns (operation.Operation)
Metadata and response of Operation:
Operation.metadata:UpdateTargetGroupMetadata
Operation.response:TargetGroup
UpdateTargetGroupRequest
Field | Description |
---|---|
target_group_id | string Required. ID of the target group to update. To get the target group ID, make a TargetGroupService.List request. |
update_mask | google.protobuf.FieldMask Field mask that specifies which attributes of the target group should be updated. |
name | string New name for the target group. The name must be unique within the folder. Value must match the regular expression ([a-z]([-a-z0-9]{0,61}[a-z0-9])?)? . |
description | string New description of the target group. The maximum string length in characters is 256. |
labels | map<string,string> Target group labels as key:value pairs. For details about the concept, see documentation. Existing set of labels is completely replaced by the provided set, so if you just want to add or remove a label:
[-_./\\@0-9a-z]* . The string length in characters for each key must be 1-63. Each key must match the regular expression [a-z][-_./\\@0-9a-z]* . |
targets[] | Target New list of targets in the target group. Existing list of targets is completely replaced by the specified list, so if you just want to add or remove a target, make a TargetGroupService.AddTargets request or a TargetGroupService.RemoveTargets request. |
Target
Field | Description |
---|---|
address_type | oneof: ip_address Reference to the target. As of now, targets must only be referred to by their IP addresses. |
ip_address | string IP address of the target. |
subnet_id | string ID of the subnet that the target is connected to. |
private_ipv4_address | bool If set, will not require subnet_id to validate the target. Instead, the address should belong to one of the following ranges: 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16 Only one of subnet_id or private_ipv4_address should be set. |
Operation
Field | Description |
---|---|
id | string ID of the operation. |
description | string Description of the operation. 0-256 characters long. |
created_at | google.protobuf.Timestamp Creation timestamp. |
created_by | string ID of the user or service account who initiated the operation. |
modified_at | google.protobuf.Timestamp The time when the Operation resource was last modified. |
done | bool If the value is false , it means the operation is still in progress. If true , the operation is completed, and either error or response is available. |
metadata | google.protobuf.Any Service-specific metadata associated with the operation. It typically contains the ID of the target resource that the operation is performed on. Any method that returns a long-running operation should document the metadata type, if any. |
result | oneof: error or response The operation result. If done == false and there was no failure detected, neither error nor response is set. If done == false and there was a failure detected, error is set. If done == true , exactly one of error or response is set. |
error | google.rpc.Status The error result of the operation in case of failure or cancellation. |
response | google.protobuf.Any if operation finished successfully. |
UpdateTargetGroupMetadata
Field | Description |
---|---|
target_group_id | string ID of the target group that is being updated. |
TargetGroup
Field | Description |
---|---|
id | string ID of the target group. Generated at creation time. |
name | string Name of the target group. The name is unique within the folder. |
description | string Description of the target group. |
folder_id | string ID of the folder that the target group belongs to. |
labels | map<string,string> Target group labels as key:value pairs. For details about the concept, see documentation. |
targets[] | Target List of targets in the target group. |
created_at | google.protobuf.Timestamp Creation timestamp. |
Delete
Deletes the specified target group.
rpc Delete (DeleteTargetGroupRequest) returns (operation.Operation)
Metadata and response of Operation:
Operation.metadata:DeleteTargetGroupMetadata
Operation.response:google.protobuf.Empty
DeleteTargetGroupRequest
Field | Description |
---|---|
target_group_id | string Required. ID of the target group to delete. To get the target group ID, make a TargetGroupService.List request. |
Operation
Field | Description |
---|---|
id | string ID of the operation. |
description | string Description of the operation. 0-256 characters long. |
created_at | google.protobuf.Timestamp Creation timestamp. |
created_by | string ID of the user or service account who initiated the operation. |
modified_at | google.protobuf.Timestamp The time when the Operation resource was last modified. |
done | bool If the value is false , it means the operation is still in progress. If true , the operation is completed, and either error or response is available. |
metadata | google.protobuf.Any Service-specific metadata associated with the operation. It typically contains the ID of the target resource that the operation is performed on. Any method that returns a long-running operation should document the metadata type, if any. |
result | oneof: error or response The operation result. If done == false and there was no failure detected, neither error nor response is set. If done == false and there was a failure detected, error is set. If done == true , exactly one of error or response is set. |
error | google.rpc.Status The error result of the operation in case of failure or cancellation. |
response | google.protobuf.Any if operation finished successfully. |
DeleteTargetGroupMetadata
Field | Description |
---|---|
target_group_id | string ID of the target group that is being deleted. |
AddTargets
Adds targets to the specified target group.
rpc AddTargets (AddTargetsRequest) returns (operation.Operation)
Metadata and response of Operation:
Operation.metadata:AddTargetsMetadata
Operation.response:TargetGroup
AddTargetsRequest
Field | Description |
---|---|
target_group_id | string Required. ID of the target group to add targets to. To get the target group ID, make a TargetGroupService.List request. |
targets[] | Target List of targets to add to the target group. The number of elements must be greater than 0. |
Target
Field | Description |
---|---|
address_type | oneof: ip_address Reference to the target. As of now, targets must only be referred to by their IP addresses. |
ip_address | string IP address of the target. |
subnet_id | string ID of the subnet that the target is connected to. |
private_ipv4_address | bool If set, will not require subnet_id to validate the target. Instead, the address should belong to one of the following ranges: 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16 Only one of subnet_id or private_ipv4_address should be set. |
Operation
Field | Description |
---|---|
id | string ID of the operation. |
description | string Description of the operation. 0-256 characters long. |
created_at | google.protobuf.Timestamp Creation timestamp. |
created_by | string ID of the user or service account who initiated the operation. |
modified_at | google.protobuf.Timestamp The time when the Operation resource was last modified. |
done | bool If the value is false , it means the operation is still in progress. If true , the operation is completed, and either error or response is available. |
metadata | google.protobuf.Any Service-specific metadata associated with the operation. It typically contains the ID of the target resource that the operation is performed on. Any method that returns a long-running operation should document the metadata type, if any. |
result | oneof: error or response The operation result. If done == false and there was no failure detected, neither error nor response is set. If done == false and there was a failure detected, error is set. If done == true , exactly one of error or response is set. |
error | google.rpc.Status The error result of the operation in case of failure or cancellation. |
response | google.protobuf.Any if operation finished successfully. |
AddTargetsMetadata
Field | Description |
---|---|
target_group_id | string ID of the target group that the targets are being added to. |
TargetGroup
Field | Description |
---|---|
id | string ID of the target group. Generated at creation time. |
name | string Name of the target group. The name is unique within the folder. |
description | string Description of the target group. |
folder_id | string ID of the folder that the target group belongs to. |
labels | map<string,string> Target group labels as key:value pairs. For details about the concept, see documentation. |
targets[] | Target List of targets in the target group. |
created_at | google.protobuf.Timestamp Creation timestamp. |
RemoveTargets
Removes targets from the specified target group.
rpc RemoveTargets (RemoveTargetsRequest) returns (operation.Operation)
Metadata and response of Operation:
Operation.metadata:RemoveTargetsMetadata
Operation.response:TargetGroup
RemoveTargetsRequest
Field | Description |
---|---|
target_group_id | string Required. ID of the target group to remove targets from. To get the target group ID, make a TargetGroupService.List request. |
targets[] | Target List of targets to remove from the target group. The number of elements must be greater than 0. |
Target
Field | Description |
---|---|
address_type | oneof: ip_address Reference to the target. As of now, targets must only be referred to by their IP addresses. |
ip_address | string IP address of the target. |
subnet_id | string ID of the subnet that the target is connected to. |
private_ipv4_address | bool If set, will not require subnet_id to validate the target. Instead, the address should belong to one of the following ranges: 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16 Only one of subnet_id or private_ipv4_address should be set. |
Operation
Field | Description |
---|---|
id | string ID of the operation. |
description | string Description of the operation. 0-256 characters long. |
created_at | google.protobuf.Timestamp Creation timestamp. |
created_by | string ID of the user or service account who initiated the operation. |
modified_at | google.protobuf.Timestamp The time when the Operation resource was last modified. |
done | bool If the value is false , it means the operation is still in progress. If true , the operation is completed, and either error or response is available. |
metadata | google.protobuf.Any Service-specific metadata associated with the operation. It typically contains the ID of the target resource that the operation is performed on. Any method that returns a long-running operation should document the metadata type, if any. |
result | oneof: error or response The operation result. If done == false and there was no failure detected, neither error nor response is set. If done == false and there was a failure detected, error is set. If done == true , exactly one of error or response is set. |
error | google.rpc.Status The error result of the operation in case of failure or cancellation. |
response | google.protobuf.Any if operation finished successfully. |
RemoveTargetsMetadata
Field | Description |
---|---|
target_group_id | string ID of the target group that the targets are being removed from. |
TargetGroup
Field | Description |
---|---|
id | string ID of the target group. Generated at creation time. |
name | string Name of the target group. The name is unique within the folder. |
description | string Description of the target group. |
folder_id | string ID of the folder that the target group belongs to. |
labels | map<string,string> Target group labels as key:value pairs. For details about the concept, see documentation. |
targets[] | Target List of targets in the target group. |
created_at | google.protobuf.Timestamp Creation timestamp. |
ListOperations
Lists operations for the specified target group.
rpc ListOperations (ListTargetGroupOperationsRequest) returns (ListTargetGroupOperationsResponse)
ListTargetGroupOperationsRequest
Field | Description |
---|---|
target_group_id | string Required. ID of the target group to get operations for. To get the target group ID, use a TargetGroupService.List request. The maximum string length in characters is 50. |
page_size | int64 The maximum number of results per page that should be returned. If the number of available results is larger than page_size , the service returns a ListTargetGroupOperationsResponse.next_page_token that can be used to get the next page of results in subsequent list requests. Default value: 100. The maximum value is 1000. |
page_token | string Page token. To get the next page of results, set page_token to the ListTargetGroupOperationsResponse.next_page_token returned by a previous list request. The maximum string length in characters is 100. |
ListTargetGroupOperationsResponse
Field | Description |
---|---|
operations[] | operation.Operation List of operations for the specified target group. |
next_page_token | string Token for getting the next page of the list. If the number of results is greater than the specified ListTargetGroupOperationsRequest.page_size, use next_page_token as the value for the ListTargetGroupOperationsRequest.page_token parameter in the next list request. Each subsequent page will have its own next_page_token to continue paging through the results. |
Operation
Field | Description |
---|---|
id | string ID of the operation. |
description | string Description of the operation. 0-256 characters long. |
created_at | google.protobuf.Timestamp Creation timestamp. |
created_by | string ID of the user or service account who initiated the operation. |
modified_at | google.protobuf.Timestamp The time when the Operation resource was last modified. |
done | bool If the value is false , it means the operation is still in progress. If true , the operation is completed, and either error or response is available. |
metadata | google.protobuf.Any Service-specific metadata associated with the operation. It typically contains the ID of the target resource that the operation is performed on. Any method that returns a long-running operation should document the metadata type, if any. |
result | oneof: error or response The operation result. If done == false and there was no failure detected, neither error nor response is set. If done == false and there was a failure detected, error is set. If done == true , exactly one of error or response is set. |
error | google.rpc.Status The error result of the operation in case of failure or cancellation. |
response | google.protobuf.Any The normal response of the operation in case of success. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty |