Cloud Logging Service, gRPC: LogGroupService
A set of methods for managing log groups.
Call | Description |
---|---|
Get | Returns the specified log group. |
Stats | Returns stats for the specified log group. |
List | Retrieves the list of log groups in the specified folder. |
Create | Creates a log group in the specified folder. |
Update | Updates the specified log group. |
Delete | Deletes the specified log group. |
ListResources | Retrieves the resources (type and IDs) in the specified log group. |
ListOperations | Lists operations for the specified log group. |
ListAccessBindings | Lists existing access bindings for the specified log group. |
SetAccessBindings | Sets access bindings for the specified log group. |
UpdateAccessBindings | Updates access bindings for the specified log group. |
Calls LogGroupService
Get
Returns the specified log group.
To get the list of all available log groups, make a List request.
rpc Get (GetLogGroupRequest) returns (LogGroup)
GetLogGroupRequest
Field | Description |
---|---|
log_group_id | string Required. ID of the log group to return. To get a log group ID make a LogGroupService.List request. The maximum string length in characters is 64. |
LogGroup
Field | Description |
---|---|
id | string Log group ID. |
folder_id | string Log group folder ID. |
cloud_id | string Log group cloud ID. |
created_at | google.protobuf.Timestamp Log group creation time. |
name | string Log group name. |
description | string Log group description. |
labels | map<string,string> Log group labels. |
status | enum Status Status of the log group.
|
retention_period | google.protobuf.Duration Log group entry retention period. Entries will be present in group during this period. |
data_stream | string Data stream name |
Stats
Returns stats for the specified log group.
rpc Stats (GetLogGroupStatsRequest) returns (GetLogGroupStatsResponse)
GetLogGroupStatsRequest
Field | Description |
---|---|
log_group_id | string Required. ID of the log group to return stats for. To get a log group ID make a LogGroupService.List request. The maximum string length in characters is 64. |
GetLogGroupStatsResponse
Field | Description |
---|---|
log_group_id | string Log group ID the stats are returned for. |
bytes | int64 Size of data in log group in bytes. |
records | int64 Amount of records in log group. |
List
Retrieves the list of log groups in the specified folder.
rpc List (ListLogGroupsRequest) returns (ListLogGroupsResponse)
ListLogGroupsRequest
Field | Description |
---|---|
folder_id | string Required. Folder ID of the log groups to return. To get a folder ID make a yandex.cloud.resourcemanager.v1.FolderService.List request. The maximum string length in characters is 64. |
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 ListLogGroupsResponse.next_page_token that can be used to get the next page of results in subsequent list requests. Default value: 100. |
page_token | string Page token. To get the next page of results, set page_token to the ListLogGroupsResponse.next_page_token returned by a previous list request. The maximum string length in characters is 100. |
filter | string A filter expression that filters log groups listed in the response. The expression must specify:
name=my-log-group . The maximum string length in characters is 1000. |
ListLogGroupsResponse
Field | Description |
---|---|
groups[] | LogGroup List of log 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 ListLogGroupsRequest.page_size, use next_page_token as the value for the ListLogGroupsRequest.page_token parameter in the next list request. Each subsequent page will have its own next_page_token to continue paging through the results. |
LogGroup
Field | Description |
---|---|
id | string Log group ID. |
folder_id | string Log group folder ID. |
cloud_id | string Log group cloud ID. |
created_at | google.protobuf.Timestamp Log group creation time. |
name | string Log group name. |
description | string Log group description. |
labels | map<string,string> Log group labels. |
status | enum Status Status of the log group.
|
retention_period | google.protobuf.Duration Log group entry retention period. Entries will be present in group during this period. |
data_stream | string Data stream name |
Create
Creates a log group in the specified folder.
rpc Create (CreateLogGroupRequest) returns (operation.Operation)
Metadata and response of Operation:
Operation.metadata:CreateLogGroupMetadata
Operation.response:LogGroup
CreateLogGroupRequest
Field | Description |
---|---|
folder_id | string Required. ID of the folder to create a log group in. To get a folder ID make a yandex.cloud.resourcemanager.v1.FolderService.List request. The maximum string length in characters is 64. |
name | string Name of the log group. The name must be unique within the folder. Value must match the regular expression ([a-z]([-a-z0-9]{1,61}[a-z0-9])?)? . |
description | string Description of the log group. The maximum string length in characters is 256. |
labels | map<string,string> Log group labels as key:value pairs. 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]* . |
retention_period | google.protobuf.Duration Log group entry retention period. Entries will be present in group during this period. If specified, must be non-negative. Empty or zero value is treated as no limit. |
data_stream | string If specified, all log records will be written to this data stream The maximum string length in characters is 512. |
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. |
CreateLogGroupMetadata
Field | Description |
---|---|
log_group_id | string ID of the log group being created. |
LogGroup
Field | Description |
---|---|
id | string Log group ID. |
folder_id | string Log group folder ID. |
cloud_id | string Log group cloud ID. |
created_at | google.protobuf.Timestamp Log group creation time. |
name | string Log group name. |
description | string Log group description. |
labels | map<string,string> Log group labels. |
status | enum Status Status of the log group.
|
retention_period | google.protobuf.Duration Log group entry retention period. Entries will be present in group during this period. |
data_stream | string Data stream name |
Update
Updates the specified log group.
rpc Update (UpdateLogGroupRequest) returns (operation.Operation)
Metadata and response of Operation:
Operation.metadata:UpdateLogGroupMetadata
Operation.response:LogGroup
UpdateLogGroupRequest
Field | Description |
---|---|
log_group_id | string Required. ID of the log group to update. To get a log group ID make a LogGroupService.List request. The maximum string length in characters is 64. |
update_mask | google.protobuf.FieldMask Field mask that specifies which attributes of the function should be updated. |
name | string New name of the log group. The name must be unique within the folder. Value must match the regular expression ([a-z]([-a-z0-9]{1,61}[a-z0-9])?)? . |
description | string New Description of the log group. The maximum string length in characters is 256. |
labels | map<string,string> New log group labels as key:value pairs. 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]* . |
retention_period | google.protobuf.Duration New log group entry retention period. Entries will be present in group during this period. If specified, must be non-negative. Empty or zero value is treated as no limit. |
data_stream | string If specified, log records will be written to this data stream The maximum string length in characters is 512. |
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. |
UpdateLogGroupMetadata
Field | Description |
---|---|
log_group_id | string ID of the log group being updated. |
LogGroup
Field | Description |
---|---|
id | string Log group ID. |
folder_id | string Log group folder ID. |
cloud_id | string Log group cloud ID. |
created_at | google.protobuf.Timestamp Log group creation time. |
name | string Log group name. |
description | string Log group description. |
labels | map<string,string> Log group labels. |
status | enum Status Status of the log group.
|
retention_period | google.protobuf.Duration Log group entry retention period. Entries will be present in group during this period. |
data_stream | string Data stream name |
Delete
Deletes the specified log group.
rpc Delete (DeleteLogGroupRequest) returns (operation.Operation)
Metadata and response of Operation:
Operation.metadata:DeleteLogGroupMetadata
Operation.response:google.protobuf.Empty
DeleteLogGroupRequest
Field | Description |
---|---|
log_group_id | string Required. ID of the log group to delete. To get a log group ID make a LogGroupService.List request. The maximum string length in characters is 64. |
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. |
DeleteLogGroupMetadata
Field | Description |
---|---|
log_group_id | string ID of the log group being deleted. |
ListResources
Retrieves the resources (type and IDs) in the specified log group.
rpc ListResources (ListResourcesRequest) returns (ListResourcesResponse)
ListResourcesRequest
Field | Description |
---|---|
log_group_id | string Required. ID of the log group to list resources for. To get a log group ID make a LogGroupService.List request. The maximum string length in characters is 64. |
type | string Resource type to return resources for. If not specified, ListResourcesResponse will contain information about all resource types. The maximum string length in characters is 256. |
ListResourcesResponse
Field | Description |
---|---|
resources[] | LogGroupResource List of resources present in log group. |
LogGroupResource
Field | Description |
---|---|
type | string Resource type. Collected from log entries inside log group. |
ids[] | string List of resource IDs with the same resource type. |
ListOperations
Lists operations for the specified log group.
rpc ListOperations (ListOperationsRequest) returns (ListOperationsResponse)
ListOperationsRequest
Field | Description |
---|---|
log_group_id | string Required. ID of the log group to list operations for. To get a log group ID make a LogGroupService.List request. The maximum string length in characters is 64. |
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 ListOperationsResponse.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 ListOperationsResponse.next_page_token returned by a previous list request. The maximum string length in characters is 100. |
filter | string A filter expression that filters resources listed in the response. The expression must specify:
done=false , created_by='John.Doe' . The maximum string length in characters is 1000. |
ListOperationsResponse
Field | Description |
---|---|
operations[] | operation.Operation List of operations for the specified log group. |
next_page_token | string Token for getting the next page of the list. If the number of results is greater than the specified ListOperationsRequest.page_size, use next_page_token as the value for the ListOperationsRequest.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 |
ListAccessBindings
Lists existing access bindings for the specified log group.
rpc ListAccessBindings (ListAccessBindingsRequest) returns (ListAccessBindingsResponse)
ListAccessBindingsRequest
Field | Description |
---|---|
resource_id | string Required. ID of the resource to list access bindings for. To get the resource ID, use a corresponding List request. For example, use the yandex.cloud.resourcemanager.v1.CloudService.List request to get the Cloud resource ID. 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 ListAccessBindingsResponse.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. Set page_token to the ListAccessBindingsResponse.next_page_token returned by a previous list request to get the next page of results. The maximum string length in characters is 100. |
ListAccessBindingsResponse
Field | Description |
---|---|
access_bindings[] | AccessBinding List of access bindings for the specified resource. |
next_page_token | string This token allows you to get the next page of results for list requests. If the number of results is larger than ListAccessBindingsRequest.page_size, use the next_page_token as the value for the ListAccessBindingsRequest.page_token query parameter in the next list request. Each subsequent list request will have its own next_page_token to continue paging through the results. |
AccessBinding
Field | Description |
---|---|
role_id | string Required. ID of the yandex.cloud.iam.v1.Role that is assigned to the subject . The maximum string length in characters is 50. |
subject | Subject Required. Identity for which access binding is being created. It can represent an account with a unique ID or several accounts with a system identifier. |
Subject
Field | Description |
---|---|
id | string Required. ID of the subject. It can contain one of the following values:
type is system .
type is userAccount , federatedUser or serviceAccount . The maximum string length in characters is 50. |
type | string Required. Type of the subject. It can contain one of the following values:
For more information, see Subject to which the role is assigned. The maximum string length in characters is 100. |
SetAccessBindings
Sets access bindings for the specified log group.
rpc SetAccessBindings (SetAccessBindingsRequest) returns (operation.Operation)
Metadata and response of Operation:
Operation.metadata:SetAccessBindingsMetadata
Operation.response:google.protobuf.Empty
SetAccessBindingsRequest
Field | Description |
---|---|
resource_id | string Required. ID of the resource for which access bindings are being set. To get the resource ID, use a corresponding List request. The maximum string length in characters is 50. |
access_bindings[] | AccessBinding Required. Access bindings to be set. For more information, see Access Bindings. |
AccessBinding
Field | Description |
---|---|
role_id | string Required. ID of the yandex.cloud.iam.v1.Role that is assigned to the subject . The maximum string length in characters is 50. |
subject | Subject Required. Identity for which access binding is being created. It can represent an account with a unique ID or several accounts with a system identifier. |
Subject
Field | Description |
---|---|
id | string Required. ID of the subject. It can contain one of the following values:
type is system .
type is userAccount , federatedUser or serviceAccount . The maximum string length in characters is 50. |
type | string Required. Type of the subject. It can contain one of the following values:
For more information, see Subject to which the role is assigned. The maximum string length in characters is 100. |
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. |
SetAccessBindingsMetadata
Field | Description |
---|---|
resource_id | string ID of the resource for which access bindings are being set. |
UpdateAccessBindings
Updates access bindings for the specified log group.
rpc UpdateAccessBindings (UpdateAccessBindingsRequest) returns (operation.Operation)
Metadata and response of Operation:
Operation.metadata:UpdateAccessBindingsMetadata
Operation.response:google.protobuf.Empty
UpdateAccessBindingsRequest
Field | Description |
---|---|
resource_id | string Required. ID of the resource for which access bindings are being updated. The maximum string length in characters is 50. |
access_binding_deltas[] | AccessBindingDelta Required. Updates to access bindings. The number of elements must be greater than 0. |
AccessBindingDelta
Field | Description |
---|---|
action | enum AccessBindingAction Required. The action that is being performed on an access binding.
|
access_binding | AccessBinding Required. Access binding. For more information, see Access Bindings. |
AccessBinding
Field | Description |
---|---|
role_id | string Required. ID of the yandex.cloud.iam.v1.Role that is assigned to the subject . The maximum string length in characters is 50. |
subject | Subject Required. Identity for which access binding is being created. It can represent an account with a unique ID or several accounts with a system identifier. |
Subject
Field | Description |
---|---|
id | string Required. ID of the subject. It can contain one of the following values:
type is system .
type is userAccount , federatedUser or serviceAccount . The maximum string length in characters is 50. |
type | string Required. Type of the subject. It can contain one of the following values:
For more information, see Subject to which the role is assigned. The maximum string length in characters is 100. |
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. |
UpdateAccessBindingsMetadata
Field | Description |
---|---|
resource_id | string ID of the resource for which access bindings are being updated. |