Yandex Cloud
  • Сервисы
  • Решения
  • Почему Yandex Cloud
  • Сообщество
  • Тарифы
  • Документация
  • Связаться с нами
Подключиться
Language / Region
© 2022 ООО «Яндекс.Облако»
Yandex Identity and Access Management
  • Начало работы
    • Как управлять доступом к ресурсам
    • Как работать с сервисными аккаунтами
  • Пошаговые инструкции
    • Все инструкции
    • Обработка секретов, попавших в открытый доступ
    • Пользователи
      • Добавление пользователя
      • Получение идентификатора или почты пользователя
      • Удаление пользователя
    • Сервисные аккаунты
      • Создание сервисного аккаунта
      • Изменение сервисного аккаунта
      • Назначение роли сервисному аккаунту
      • Настройка прав доступа к сервисному аккаунту
      • Создание статических ключей доступа
      • Удаление статических ключей доступа
      • Получение идентификатора сервисного аккаунта
      • Удаление сервисного аккаунта
    • Роли
      • Назначение роли
      • Просмотр назначенных ролей
      • Отзыв роли
    • IAM-токены
      • Получение IAM-токена для аккаунта на Яндексе
      • Получение IAM-токена для сервисного аккаунта
      • Получение IAM-токена для федеративного аккаунта
    • Ключи
      • Создание API-ключа
      • Удаление API-ключа
      • Создание авторизованного ключа
      • Удаление авторизованного ключа
  • Концепции
    • Обзор
    • Как устроено управление доступом
      • Обзор
      • Роли
      • Системные группы
      • Ресурсы, на которые можно назначать роли
    • Авторизация
      • Обзор
      • IAM-токен
      • OAuth-токен
      • API-ключ
      • Авторизованные ключи
      • AWS-совместимые ключи доступа
    • Сервисные аккаунты
    • Федерации удостоверений
    • Квоты и лимиты
  • Безопасное использование Yandex Cloud
  • Управление доступом
  • Правила тарификации
  • Справочник API
    • Аутентификация в API
    • gRPC (англ.)
      • Overview
      • ApiKeyService
      • IamTokenService
      • KeyService
      • RoleService
      • ServiceAccountService
      • UserAccountService
      • YandexPassportUserAccountService
      • AccessKeyService
      • CertificateService
      • FederationService
      • OperationService
    • REST (англ.)
      • Overview
      • ApiKey
        • Overview
        • create
        • delete
        • get
        • list
        • listOperations
        • update
      • IamToken
        • Overview
        • create
        • createForServiceAccount
      • Key
        • Overview
        • create
        • delete
        • get
        • list
        • listOperations
        • update
      • Role
        • Overview
        • get
        • list
      • ServiceAccount
        • Overview
        • create
        • delete
        • get
        • list
        • listAccessBindings
        • listOperations
        • setAccessBindings
        • update
        • updateAccessBindings
      • UserAccount
        • Overview
        • get
      • YandexPassportUserAccount
        • Overview
        • getByLogin
      • Operation
        • Overview
        • get
      • AccessKey
        • Overview
        • list
        • get
        • delete
        • update
        • listOperations
        • create
      • Federation
        • Overview
        • list
        • get
        • listUserAccounts
        • delete
        • addUserAccounts
        • update
        • listOperations
        • create
      • Certificate
        • Overview
        • list
        • get
        • delete
        • update
        • listOperations
        • create
  • Вопросы и ответы
    • Общие вопросы
    • Вход в систему и доступ к ресурсам
    • Все вопросы на одной странице
  1. Справочник API
  2. gRPC (англ.)
  3. ApiKeyService

ApiKeyService

Статья создана
Yandex Cloud
  • Calls ApiKeyService
  • List
    • ListApiKeysRequest
    • ListApiKeysResponse
    • ApiKey
  • Get
    • GetApiKeyRequest
    • ApiKey
  • Create
    • CreateApiKeyRequest
    • CreateApiKeyResponse
    • ApiKey
  • Update
    • UpdateApiKeyRequest
    • Operation
    • UpdateApiKeyMetadata
    • ApiKey
  • Delete
    • DeleteApiKeyRequest
    • Operation
    • DeleteApiKeyMetadata
  • ListOperations
    • ListApiKeyOperationsRequest
    • ListApiKeyOperationsResponse
    • Operation

A set of methods for managing API keys.

Call Description
List Retrieves the list of API keys for the specified service account.
Get Returns the specified API key.
Create Creates an API key for the specified service account.
Update Updates the specified API key.
Delete Deletes the specified API key.
ListOperations Retrieves the list of operations for the specified API key.

Calls ApiKeyService

List

Retrieves the list of API keys for the specified service account.

rpc List (ListApiKeysRequest) returns (ListApiKeysResponse)

ListApiKeysRequest

Field Description
service_account_id string
ID of the service account to list API keys for. To get the service account ID, use a yandex.cloud.iam.v1.ServiceAccountService.List request. If not specified, it defaults to the subject that made the request. The maximum string length in characters is 50.
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 ListApiKeysResponse.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 ListApiKeysResponse.next_page_token returned by a previous list request. The maximum string length in characters is 100.

ListApiKeysResponse

Field Description
api_keys[] ApiKey
List of API keys.
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 ListApiKeysRequest.page_size, use the next_page_token as the value for the ListApiKeysRequest.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.

ApiKey

Field Description
id string
ID of the API Key.
service_account_id string
ID of the service account that the API key belongs to.
created_at google.protobuf.Timestamp
Creation timestamp.
description string
Description of the API key. 0-256 characters long.

Get

Returns the specified API key.
To get the list of available API keys, make a List request.

rpc Get (GetApiKeyRequest) returns (ApiKey)

GetApiKeyRequest

Field Description
api_key_id string
Required. ID of the API key to return. To get the API key ID, use a ApiKeyService.List request. The maximum string length in characters is 50.

ApiKey

Field Description
id string
ID of the API Key.
service_account_id string
ID of the service account that the API key belongs to.
created_at google.protobuf.Timestamp
Creation timestamp.
description string
Description of the API key. 0-256 characters long.

Create

Creates an API key for the specified service account.

rpc Create (CreateApiKeyRequest) returns (CreateApiKeyResponse)

CreateApiKeyRequest

Field Description
service_account_id string
ID of the service account to create an API key for. To get the service account ID, use a yandex.cloud.iam.v1.ServiceAccountService.List request. If not specified, it defaults to the subject that made the request. The maximum string length in characters is 50.
description string
Description of the API key. The maximum string length in characters is 256.

CreateApiKeyResponse

Field Description
api_key ApiKey
ApiKey resource.
secret string
Secret part of the API key. This secret key you may use in the requests for authentication.

ApiKey

Field Description
id string
ID of the API Key.
service_account_id string
ID of the service account that the API key belongs to.
created_at google.protobuf.Timestamp
Creation timestamp.
description string
Description of the API key. 0-256 characters long.

Update

Updates the specified API key.

rpc Update (UpdateApiKeyRequest) returns (operation.Operation)

Metadata and response of Operation:

    Operation.metadata:UpdateApiKeyMetadata

    Operation.response:ApiKey

UpdateApiKeyRequest

Field Description
api_key_id string
Required. ID of the ApiKey resource to update. To get the API key ID, use a ApiKeyService.List request. The maximum string length in characters is 50.
update_mask google.protobuf.FieldMask
Field mask that specifies which fields of the ApiKey resource are going to be updated.
description string
Description of the API key. The maximum string length in characters is 256.

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<UpdateApiKeyMetadata>
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<ApiKey>
if operation finished successfully.

UpdateApiKeyMetadata

Field Description
api_key_id string
ID of the ApiKey resource that is being updated.

ApiKey

Field Description
id string
ID of the API Key.
service_account_id string
ID of the service account that the API key belongs to.
created_at google.protobuf.Timestamp
Creation timestamp.
description string
Description of the API key. 0-256 characters long.

Delete

Deletes the specified API key.

rpc Delete (DeleteApiKeyRequest) returns (operation.Operation)

Metadata and response of Operation:

    Operation.metadata:DeleteApiKeyMetadata

    Operation.response:google.protobuf.Empty

DeleteApiKeyRequest

Field Description
api_key_id string
Required. ID of the API key to delete. To get the API key ID, use a ApiKeyService.List request. The maximum string length in characters is 50.

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<DeleteApiKeyMetadata>
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<google.protobuf.Empty>
if operation finished successfully.

DeleteApiKeyMetadata

Field Description
api_key_id string
ID of the API key that is being deleted.

ListOperations

Retrieves the list of operations for the specified API key.

rpc ListOperations (ListApiKeyOperationsRequest) returns (ListApiKeyOperationsResponse)

ListApiKeyOperationsRequest

Field Description
api_key_id string
Required. ID of the key to list operations for. The maximum string length in characters is 50.
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 ListApiKeyOperationsResponse.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 ListApiKeyOperationsResponse.next_page_token returned by a previous list request. The maximum string length in characters is 100.

ListApiKeyOperationsResponse

Field Description
operations[] operation.Operation
List of operations for the specified API key.
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 ListApiKeyOperationsRequest.page_size, use the next_page_token as the value for the ListApiKeyOperationsRequest.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.

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. If the original method is the standard Create/Update, the response should be the target resource of the operation. Any method that returns a long-running operation should document the response type, if any.

Была ли статья полезна?

Language / Region
© 2022 ООО «Яндекс.Облако»
В этой статье:
  • Calls ApiKeyService
  • List
  • ListApiKeysRequest
  • ListApiKeysResponse
  • ApiKey
  • Get
  • GetApiKeyRequest
  • ApiKey
  • Create
  • CreateApiKeyRequest
  • CreateApiKeyResponse
  • ApiKey
  • Update
  • UpdateApiKeyRequest
  • Operation
  • UpdateApiKeyMetadata
  • ApiKey
  • Delete
  • DeleteApiKeyRequest
  • Operation
  • DeleteApiKeyMetadata
  • ListOperations
  • ListApiKeyOperationsRequest
  • ListApiKeyOperationsResponse
  • Operation