Skip to main content

List

Retrieves the list of Service in the specified resource container.

import { cloudApi, serviceClients, Session } from "@yandex-cloud/nodejs-sdk";

const ListServicesRequest =
cloudApi.billing.service_service.ListServicesRequest;

(async () => {
const authToken = process.env["YC_OAUTH_TOKEN"];
const session = new Session({ oauthToken: authToken });
const client = session.client(serviceClients.ServiceControlServiceClient);

const result = await client.list(
ListServicesRequest.fromPartial({
// filter: "filter",
// pageSize: 0,
// pageToken: "pageToken"
})
);
console.log(result);
})();

ListServicesRequest

resource : Resource

Resource container to list a services.

It is supported only resource-manager.cloud resource container now.

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 ListServicesResponse.next_page_token that can be used to get the next page of results in subsequent list requests. Default value: 100

pageToken : string

Page token. To get the next page of results, set page_token to the ListServicesResponse.next_page_token returned by a previous list request.

Resource

A Resource. For more information, see Resource.

id : string

ID of the resource.

type : string

The type of the resource, e.g. resource-manager.folder, billing.account, compute.snapshot, etc.

ListServicesResponse

services : Service

List of Services.

nextPageToken : string

This token allows you to get the next page of results for list requests. If the number of results is larger than ListServicesRequest.page_size, use the next_page_token as the value for the ListServicesRequest.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.

Service

A Service.

Status
  • STATUS_UNSPECIFIED

  • ENABLED

    The service is enabled.

  • PAUSED

    The service is paused.

  • DISABLED

    The service is disabled.

  • ENABLING

    The service is being enabled.

  • RESUMING

    The service is being resumed.

  • PAUSING

    The service is being paused.

  • DISABLING

    The service is being disabled.

  • ERROR

    The service is in error state.

  • DEFAULT

    The service could be auto enabled.

serviceId : string

ID of the service.

resource : Resource

Resource that the service belongs to.

updatedAt : google.protobuf.Timestamp

Time of the last status update of the service.

status : Status

Current status of the service.

Resource

A Resource. For more information, see Resource.

id : string

ID of the resource.

type : string

The type of the resource, e.g. resource-manager.folder, billing.account, compute.snapshot, etc.