List
Lists projects for the specified community.
- TypeScript
- Python
import { cloudApi, serviceClients, Session } from "@yandex-cloud/nodejs-sdk";
const ListProjectsRequest =
cloudApi.datasphere.project_service.ListProjectsRequest;
(async () => {
const authToken = process.env["YC_OAUTH_TOKEN"];
const session = new Session({ oauthToken: authToken });
const client = session.client(serviceClients.ProjectServiceClient);
const result = await client.list(
ListProjectsRequest.fromPartial({
folderId: "folderId",
// pageSize: 0,
// pageToken: "pageToken"
})
);
console.log(result);
})();
import os
import grpc
import yandexcloud
from yandex.cloud.datasphere.v1.project_service_pb2 import ListProjectsRequest
from yandex.cloud.datasphere.v1.project_service_pb2_grpc import ProjectServiceStub
token = os.getenv("YC_OAUTH_TOKEN")
sdk = yandexcloud.SDK(token=token)
service = sdk.client(ProjectServiceStub)
response = service.List(
ListProjectsRequest(
folder_id="folderId",
# page_size = 0,
# page_token = "pageToken"
)
)
print(response)
ListProjectsRequest
communityId : string
ID of the community to list projects in.
pageSize : 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 ListProjectsResponse.next_page_token that can be used to get the next page of results in subsequent list requests.
pageToken : string
Page token. To get the next page of results, set page_token to the ListProjectsResponse.next_page_token returned by a previous list request.
projectNamePattern : string
Name pattern to filter projects that are returned. Only projects with names matching the pattern will be returned.
ownedById : string
User ID to filter projects that are returned. Only projects that are owned by specified user will be returned.
ListProjectsResponse
projects : Project
List of Project resources.
nextPageToken : string
This token allows you to get the next page of results for list requests. If the number of results is larger than ListProjectsRequest.page_size, use the next_page_token as the value for the ListProjectsRequest.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.
Project
A Project resource.
Settings
Ide
IDE_UNSPECIFIEDJUPYTER_LABProject running on JupyterLab IDE.
StaleExecutionTimeoutMode
STALE_EXECUTION_TIMEOUT_MODE_UNSPECIFIEDONE_HOURSetting to automatically stop stale execution after one hour with low consumption.
THREE_HOURSSetting to automatically stop stale execution after three hours with low consumption.
NO_TIMEOUTSetting to never automatically stop stale executions.
serviceAccountId : string
ID of the service account, on whose behalf all operations with clusters will be performed.
subnetId : string
ID of the subnet where the DataProc cluster resides. Currently only subnets created in the availability zone ru-central1-a are supported.
dataProcClusterId : string
ID of the DataProc cluster.
securityGroupIds : string
Network interfaces security groups.
earlyAccess : bool
Is early access preview enabled for the project.
ide : Ide
Project IDE.
defaultFolderId : string
Default project folder ID.
staleExecTimeoutMode : StaleExecutionTimeoutMode
Timeout to automatically stop stale executions.
vmInactivityTimeout : google.protobuf.Duration
Timeout for VM deallocation.
defaultDedicatedSpec : string
Default VM configuration for DEDICATED mode.
Limits
maxUnitsPerHour : google.protobuf.Int64Value
The number of units that can be spent per hour.
maxUnitsPerExecution : google.protobuf.Int64Value
The number of units that can be spent on the one execution.
id : string
ID of the project.
createdAt : google.protobuf.Timestamp
name : string
Name of the project. 1-63 characters long.
description : string
Description of the project. 0-256 characters long.
labels : string
createdById : string
settings : Settings
Settings of the project.
limits : Limits
Limits of the project.
communityId : string
ID of the community that the project belongs to.
Settings
Ide
IDE_UNSPECIFIEDJUPYTER_LABProject running on JupyterLab IDE.
StaleExecutionTimeoutMode
STALE_EXECUTION_TIMEOUT_MODE_UNSPECIFIEDONE_HOURSetting to automatically stop stale execution after one hour with low consumption.
THREE_HOURSSetting to automatically stop stale execution after three hours with low consumption.
NO_TIMEOUTSetting to never automatically stop stale executions.
serviceAccountId : string
ID of the service account, on whose behalf all operations with clusters will be performed.
subnetId : string
ID of the subnet where the DataProc cluster resides. Currently only subnets created in the availability zone ru-central1-a are supported.
dataProcClusterId : string
ID of the DataProc cluster.
securityGroupIds : string
Network interfaces security groups.
earlyAccess : bool
Is early access preview enabled for the project.
ide : Ide
Project IDE.
defaultFolderId : string
Default project folder ID.
staleExecTimeoutMode : StaleExecutionTimeoutMode
Timeout to automatically stop stale executions.
vmInactivityTimeout : google.protobuf.Duration
Timeout for VM deallocation.
defaultDedicatedSpec : string
Default VM configuration for DEDICATED mode.
Limits
maxUnitsPerHour : google.protobuf.Int64Value
The number of units that can be spent per hour.
maxUnitsPerExecution : google.protobuf.Int64Value
The number of units that can be spent on the one execution.