Yandex Cloud
  • Services
  • Solutions
  • Why Yandex Cloud
  • Blog
  • Pricing
  • Documentation
  • Contact us
Get started
Language / Region
Yandex project
© 2023 Yandex.Cloud LLC
Yandex IoT Core
  • Getting started
  • Step-by-step instructions
    • All instructions
    • Sending messages
    • Subscribing a device or registry to receive messages
    • Viewing the connection log
    • Creating a trigger for a topic
    • Managing registries
      • Getting information about registries
      • Creating a registry
      • Updating a registry
      • Deleting a registry
    • Managing devices
      • Managing topic aliases
        • Creating an alias
        • Getting a list of aliases
        • Updating an alias
        • Deleting an alias
      • Getting information about devices
      • Creating a device
      • Updating a device
      • Deleting a device
    • Managing brokers
      • Getting information about a broker
      • Creating a broker
      • Updating a broker
      • Deleting a broker
    • Managing certificates
      • Create a certificate
      • Managing registry certificates
      • Managing device certificates
      • Managing broker certificates
    • Managing passwords
      • Managing registry passwords
      • Managing device passwords
      • Managing broker passwords
  • Concepts
    • Authorization
    • Relationship between service resources
    • MQTT server connection parameters
    • Sending messages to an MQTT server via gRPC
    • Topic
      • Overview
      • Device topics
      • Registry topics
      • Subtopic
      • Using topics
    • Backups
    • Quotas and limits
  • Practical guidelines
    • All tutorials
    • Working with Mosquitto
      • Sending messages
      • Subscribing a device or registry to receive messages
    • Working with Yandex IoT Core from an Android device in Java
    • Working with Yandex IoT Core in C#
    • Working with Yandex IoT Core in Java
    • Writing data from a device to Managed Service for PostgreSQL
  • Access management
  • Pricing policy
  • Devices API reference
    • Authentication in the API
    • gRPC
      • Overview
      • DeviceDataService
      • DeviceService
      • RegistryDataService
      • RegistryService
      • OperationService
    • REST
      • Overview
      • DeviceData
        • Overview
        • publish
      • Device
        • Overview
        • addCertificate
        • addPassword
        • create
        • delete
        • deleteCertificate
        • deletePassword
        • get
        • getByName
        • list
        • listCertificates
        • listOperations
        • listPasswords
        • update
      • RegistryData
        • Overview
        • publish
      • Registry
        • Overview
        • addCertificate
        • addPassword
        • create
        • delete
        • deleteCertificate
        • deletePassword
        • get
        • getByName
        • list
        • listCertificates
        • listDeviceTopicAliases
        • listOperations
        • listPasswords
        • update
  • Broker API reference
    • Authentication in the API
    • gRPC
      • Overview
      • BrokerDataService
      • BrokerService
      • OperationService
    • REST
      • Overview
      • BrokerData
        • Overview
        • publish
      • Broker
        • Overview
        • addCertificate
        • addPassword
        • create
        • delete
        • deleteCertificate
        • deletePassword
        • get
        • list
        • listCertificates
        • listOperations
        • listPasswords
        • update
  • Questions and answers
  1. Devices API reference
  2. gRPC
  3. DeviceService

IoT Core Service, gRPC: DeviceService

Written by
Yandex Cloud
  • Calls DeviceService
  • Get
    • GetDeviceRequest
    • Device
    • DeviceMonitoringData
  • GetByName
    • GetByNameDeviceRequest
    • Device
    • DeviceMonitoringData
  • List
    • ListDevicesRequest
    • ListDevicesResponse
    • Device
    • DeviceMonitoringData
  • Create
    • CreateDeviceRequest
    • Certificate
    • Operation
    • CreateDeviceMetadata
    • Device
    • DeviceMonitoringData
  • Update
    • UpdateDeviceRequest
    • Operation
    • UpdateDeviceMetadata
    • Device
    • DeviceMonitoringData
  • Delete
    • DeleteDeviceRequest
    • Operation
    • DeleteDeviceMetadata
  • ListCertificates
    • ListDeviceCertificatesRequest
    • ListDeviceCertificatesResponse
    • DeviceCertificate
  • AddCertificate
    • AddDeviceCertificateRequest
    • Operation
    • AddDeviceCertificateMetadata
    • DeviceCertificate
  • DeleteCertificate
    • DeleteDeviceCertificateRequest
    • Operation
    • DeleteDeviceCertificateMetadata
  • ListPasswords
    • ListDevicePasswordsRequest
    • ListDevicePasswordsResponse
    • DevicePassword
  • AddPassword
    • AddDevicePasswordRequest
    • Operation
    • AddDevicePasswordMetadata
    • DevicePassword
  • DeletePassword
    • DeleteDevicePasswordRequest
    • Operation
    • DeleteDevicePasswordMetadata
  • ListOperations
    • ListDeviceOperationsRequest
    • ListDeviceOperationsResponse
    • Operation

A set of methods for managing devices.

Call Description
Get Returns the specified device.
GetByName
List Retrieves the list of devices in the specified registry.
Create Creates a device in the specified registry.
Update Updates the specified device.
Delete Deletes the specified device.
ListCertificates Retrieves the list of device certificates for the specified device.
AddCertificate Adds a certificate.
DeleteCertificate Deletes the specified device certificate.
ListPasswords Retrieves the list of passwords for the specified device.
AddPassword Adds password for the specified device.
DeletePassword Deletes the specified password.
ListOperations Lists operations for the specified device.

Calls DeviceService

Get

Returns the specified device.
To get the list of available devices, make a List request.

rpc Get (GetDeviceRequest) returns (Device)

GetDeviceRequest

Field Description
device_id string
Required. ID of the device to return.
To get a device ID make a DeviceService.List request. The maximum string length in characters is 50.
device_view enum DeviceView
Specifies which parts of the device resource should be returned in the response.
  • BASIC: Server responses without monitoring data. The default value.
  • FULL: Server responses with monitoring data.

Device

Field Description
id string
ID of the device.
registry_id string
ID of the registry that the device belongs to.
created_at google.protobuf.Timestamp
Creation timestamp.
name string
Name of the device. The name is unique within the registry.
description string
Description of the device. 0-256 characters long.
topic_aliases map<string,string>
Alias of a device topic.
Alias is an alternate name of a device topic assigned by the user. Map alias to canonical topic name prefix, e.g. my/custom/alias match to $device/abcdef/events.
status enum Status
Status of the device.
  • CREATING: Device is being created.
  • ACTIVE: Device is ready to use.
  • DELETING: Device is being deleted.
monitoring_data DeviceMonitoringData
Device monitoring data, returns if FULL view specified.

DeviceMonitoringData

Field Description
last_auth_ip string
last_auth_time google.protobuf.Timestamp
last_pub_activity_time google.protobuf.Timestamp
last_sub_activity_time google.protobuf.Timestamp
last_online_time google.protobuf.Timestamp

GetByName

rpc GetByName (GetByNameDeviceRequest) returns (Device)

GetByNameDeviceRequest

Field Description
registry_id string
Required. ID of the registry to get device.
To get a registry ID make a yandex.cloud.iot.devices.v1.RegistryService.List request. The maximum string length in characters is 50.
device_name string
Required. Name of the device to return.
To get a device name make a DeviceService.List request. The maximum string length in characters is 50. Value must match the regular expression [a-zA-Z0-9_-]*.
device_view enum DeviceView
Specifies which parts of the device resource should be returned in the response.
  • BASIC: Server responses without monitoring data. The default value.
  • FULL: Server responses with monitoring data.

Device

Field Description
id string
ID of the device.
registry_id string
ID of the registry that the device belongs to.
created_at google.protobuf.Timestamp
Creation timestamp.
name string
Name of the device. The name is unique within the registry.
description string
Description of the device. 0-256 characters long.
topic_aliases map<string,string>
Alias of a device topic.
Alias is an alternate name of a device topic assigned by the user. Map alias to canonical topic name prefix, e.g. my/custom/alias match to $device/abcdef/events.
status enum Status
Status of the device.
  • CREATING: Device is being created.
  • ACTIVE: Device is ready to use.
  • DELETING: Device is being deleted.
monitoring_data DeviceMonitoringData
Device monitoring data, returns if FULL view specified.

DeviceMonitoringData

Field Description
last_auth_ip string
last_auth_time google.protobuf.Timestamp
last_pub_activity_time google.protobuf.Timestamp
last_sub_activity_time google.protobuf.Timestamp
last_online_time google.protobuf.Timestamp

List

Retrieves the list of devices in the specified registry.

rpc List (ListDevicesRequest) returns (ListDevicesResponse)

ListDevicesRequest

Field Description
id oneof: registry_id or folder_id
  registry_id string
ID of the registry to list devices in.
To get a registry ID make a yandex.cloud.iot.devices.v1.RegistryService.List request. The maximum string length in characters is 50.
  folder_id string
ID of the folder to list devices in.
To get a folder ID make a yandex.cloud.resourcemanager.v1.FolderService.List 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 ListDevicesResponse.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 ListDevicesResponse.next_page_token returned by a previous list request. The maximum string length in characters is 100.
device_view enum DeviceView
Specifies which parts of the device resource should be returned in the response.
  • BASIC: Server responses without monitoring data. The default value.
  • FULL: Server responses with monitoring data.

ListDevicesResponse

Field Description
devices[] Device
List of devices.
next_page_token string
Token for getting the next page of the list. If the number of results is greater than the specified ListDevicesRequest.page_size, use next_page_token as the value for the ListDevicesRequest.page_token parameter in the next list request.
Each subsequent page will have its own next_page_token to continue paging through the results.

Device

Field Description
id string
ID of the device.
registry_id string
ID of the registry that the device belongs to.
created_at google.protobuf.Timestamp
Creation timestamp.
name string
Name of the device. The name is unique within the registry.
description string
Description of the device. 0-256 characters long.
topic_aliases map<string,string>
Alias of a device topic.
Alias is an alternate name of a device topic assigned by the user. Map alias to canonical topic name prefix, e.g. my/custom/alias match to $device/abcdef/events.
status enum Status
Status of the device.
  • CREATING: Device is being created.
  • ACTIVE: Device is ready to use.
  • DELETING: Device is being deleted.
monitoring_data DeviceMonitoringData
Device monitoring data, returns if FULL view specified.

DeviceMonitoringData

Field Description
last_auth_ip string
last_auth_time google.protobuf.Timestamp
last_pub_activity_time google.protobuf.Timestamp
last_sub_activity_time google.protobuf.Timestamp
last_online_time google.protobuf.Timestamp

Create

Creates a device in the specified registry.

rpc Create (CreateDeviceRequest) returns (operation.Operation)

Metadata and response of Operation:

    Operation.metadata:CreateDeviceMetadata

    Operation.response:Device

CreateDeviceRequest

Field Description
registry_id string
Required. ID of the registry to create a device in.
To get a registry ID, make a yandex.cloud.iot.devices.v1.RegistryService.List request. The maximum string length in characters is 50.
name string
Required. Name of the device. The name must be unique within the registry. The maximum string length in characters is 50. Value must match the regular expression [a-zA-Z0-9_-]*.
description string
Description of the device. The maximum string length in characters is 256.
certificates[] Certificate
Device certificate.
topic_aliases map<string,string>
Alias of a device topic.
Alias is an alternate name of a device topic assigned by the user. Map alias to canonical topic name prefix, e.g. my/custom/alias match to $device/{id}/events.
password string
Device password.
The password must contain at least three character categories among the following: upper case latin, lower case latin, numbers and special symbols.

Certificate

Field Description
certificate_data string
Public part of the device certificate.

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<CreateDeviceMetadata>
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<Device>
if operation finished successfully.

CreateDeviceMetadata

Field Description
device_id string
ID of the device that is being created.

Device

Field Description
id string
ID of the device.
registry_id string
ID of the registry that the device belongs to.
created_at google.protobuf.Timestamp
Creation timestamp.
name string
Name of the device. The name is unique within the registry.
description string
Description of the device. 0-256 characters long.
topic_aliases map<string,string>
Alias of a device topic.
Alias is an alternate name of a device topic assigned by the user. Map alias to canonical topic name prefix, e.g. my/custom/alias match to $device/abcdef/events.
status enum Status
Status of the device.
  • CREATING: Device is being created.
  • ACTIVE: Device is ready to use.
  • DELETING: Device is being deleted.
monitoring_data DeviceMonitoringData
Device monitoring data, returns if FULL view specified.

DeviceMonitoringData

Field Description
last_auth_ip string
last_auth_time google.protobuf.Timestamp
last_pub_activity_time google.protobuf.Timestamp
last_sub_activity_time google.protobuf.Timestamp
last_online_time google.protobuf.Timestamp

Update

Updates the specified device.

rpc Update (UpdateDeviceRequest) returns (operation.Operation)

Metadata and response of Operation:

    Operation.metadata:UpdateDeviceMetadata

    Operation.response:Device

UpdateDeviceRequest

Field Description
device_id string
Required. ID of the device to update.
To get a device ID make a DeviceService.List request. The maximum string length in characters is 50.
update_mask google.protobuf.FieldMask
Field mask that specifies which fields of the device are going to be updated.
name string
Name of the device. The name must be unique within the registry. The maximum string length in characters is 50. Value must match the regular expression [a-zA-Z0-9_-]*.
description string
Description of the device. The maximum string length in characters is 256.
topic_aliases map<string,string>
Alias of a device topic.
Alias is an alternate name of a device topic assigned by the user. Map alias to canonical topic name prefix, e.g. my/custom/alias match to $device/{id}/events.

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<UpdateDeviceMetadata>
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<Device>
if operation finished successfully.

UpdateDeviceMetadata

Field Description
device_id string
ID of the device that is being updated.

Device

Field Description
id string
ID of the device.
registry_id string
ID of the registry that the device belongs to.
created_at google.protobuf.Timestamp
Creation timestamp.
name string
Name of the device. The name is unique within the registry.
description string
Description of the device. 0-256 characters long.
topic_aliases map<string,string>
Alias of a device topic.
Alias is an alternate name of a device topic assigned by the user. Map alias to canonical topic name prefix, e.g. my/custom/alias match to $device/abcdef/events.
status enum Status
Status of the device.
  • CREATING: Device is being created.
  • ACTIVE: Device is ready to use.
  • DELETING: Device is being deleted.
monitoring_data DeviceMonitoringData
Device monitoring data, returns if FULL view specified.

DeviceMonitoringData

Field Description
last_auth_ip string
last_auth_time google.protobuf.Timestamp
last_pub_activity_time google.protobuf.Timestamp
last_sub_activity_time google.protobuf.Timestamp
last_online_time google.protobuf.Timestamp

Delete

Deletes the specified device.

rpc Delete (DeleteDeviceRequest) returns (operation.Operation)

Metadata and response of Operation:

    Operation.metadata:DeleteDeviceMetadata

    Operation.response:google.protobuf.Empty

DeleteDeviceRequest

Field Description
device_id string
Required. ID of the device to delete.
To get a device ID make a DeviceService.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<DeleteDeviceMetadata>
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.

DeleteDeviceMetadata

Field Description
device_id string
ID of the device that is being deleted.

ListCertificates

Retrieves the list of device certificates for the specified device.

rpc ListCertificates (ListDeviceCertificatesRequest) returns (ListDeviceCertificatesResponse)

ListDeviceCertificatesRequest

Field Description
device_id string
Required. ID of the device to list certificates for. The maximum string length in characters is 50.

ListDeviceCertificatesResponse

Field Description
certificates[] DeviceCertificate
List of certificates for the specified device.

DeviceCertificate

Field Description
device_id string
ID of the device that the certificate belongs to.
fingerprint string
SHA256 hash of the certificate.
certificate_data string
Public part of the certificate.
created_at google.protobuf.Timestamp
Creation timestamp.

AddCertificate

Adds a certificate.

rpc AddCertificate (AddDeviceCertificateRequest) returns (operation.Operation)

Metadata and response of Operation:

    Operation.metadata:AddDeviceCertificateMetadata

    Operation.response:DeviceCertificate

AddDeviceCertificateRequest

Field Description
device_id string
Required. ID of the device for which the certificate is being added.
To get a device ID make a DeviceService.List request. The maximum string length in characters is 50.
certificate_data string
Public part of the certificate.

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<AddDeviceCertificateMetadata>
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<DeviceCertificate>
if operation finished successfully.

AddDeviceCertificateMetadata

Field Description
device_id string
ID of the device certificate that is being added.
fingerprint string
Fingerprint of the certificate that is being added.

DeviceCertificate

Field Description
device_id string
ID of the device that the certificate belongs to.
fingerprint string
SHA256 hash of the certificate.
certificate_data string
Public part of the certificate.
created_at google.protobuf.Timestamp
Creation timestamp.

DeleteCertificate

Deletes the specified device certificate.

rpc DeleteCertificate (DeleteDeviceCertificateRequest) returns (operation.Operation)

Metadata and response of Operation:

    Operation.metadata:DeleteDeviceCertificateMetadata

    Operation.response:google.protobuf.Empty

DeleteDeviceCertificateRequest

Field Description
device_id string
Required. ID of the device to delete a certificate for.
To get a device ID make a DeviceService.List request. The maximum string length in characters is 50.
fingerprint string
Required. Fingerprint of the certificate to delete. 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<DeleteDeviceCertificateMetadata>
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.

DeleteDeviceCertificateMetadata

Field Description
device_id string
Required. ID of the device certificate that is being deleted. The maximum string length in characters is 50.
fingerprint string
Required. Fingerprint of the certificate that is being deleted. The maximum string length in characters is 50.

ListPasswords

Retrieves the list of passwords for the specified device.

rpc ListPasswords (ListDevicePasswordsRequest) returns (ListDevicePasswordsResponse)

ListDevicePasswordsRequest

Field Description
device_id string
Required. ID of the registry to list passwords in.
To get a registry ID make a RegistryService.List request. The maximum string length in characters is 50.

ListDevicePasswordsResponse

Field Description
passwords[] DevicePassword
List of passwords for the specified device.

DevicePassword

Field Description
device_id string
ID of the device that the password belongs to.
id string
ID of the password.
created_at google.protobuf.Timestamp
Creation timestamp.

AddPassword

Adds password for the specified device.

rpc AddPassword (AddDevicePasswordRequest) returns (operation.Operation)

Metadata and response of Operation:

    Operation.metadata:AddDevicePasswordMetadata

    Operation.response:DevicePassword

AddDevicePasswordRequest

Field Description
device_id string
Required. ID of the device to add a password for.
To get a device ID make a DeviceService.List request. The maximum string length in characters is 50.
password string
Passwords for the device.
The password must contain at least three character categories among the following: upper case latin, lower case latin, numbers and special symbols. The minimum string length in characters is 14.

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<AddDevicePasswordMetadata>
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<DevicePassword>
if operation finished successfully.

AddDevicePasswordMetadata

Field Description
device_id string
ID of the device for which the password is being added.
password_id string
ID of the password that is being added.

DevicePassword

Field Description
device_id string
ID of the device that the password belongs to.
id string
ID of the password.
created_at google.protobuf.Timestamp
Creation timestamp.

DeletePassword

Deletes the specified password.

rpc DeletePassword (DeleteDevicePasswordRequest) returns (operation.Operation)

Metadata and response of Operation:

    Operation.metadata:DeleteDevicePasswordMetadata

    Operation.response:google.protobuf.Empty

DeleteDevicePasswordRequest

Field Description
device_id string
Required. ID of the device to delete a password for.
To get a device ID make a DeviceService.List request. The maximum string length in characters is 50.
password_id string
Required. ID of the password to delete.
To get a password ID make a DeviceService.ListPasswords 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<DeleteDevicePasswordMetadata>
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.

DeleteDevicePasswordMetadata

Field Description
device_id string
Required. ID of the device for which the password is being deleted. The maximum string length in characters is 50.
password_id string
Required. ID of the password that is being deleted. The maximum string length in characters is 50.

ListOperations

Lists operations for the specified device.

rpc ListOperations (ListDeviceOperationsRequest) returns (ListDeviceOperationsResponse)

ListDeviceOperationsRequest

Field Description
device_id string
Required. ID of the device to list operations for.
To get a device ID make a DeviceService.List request.
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 ListDeviceOperationsResponse.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 ListDeviceOperationsResponse.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. Currently you can use filtering only on Device.name field. The maximum string length in characters is 1000.

ListDeviceOperationsResponse

Field Description
operations[] operation.Operation
List of operations for the specified device certificate.
next_page_token string
Token for getting the next page of the list. If the number of results is greater than the specified ListDeviceOperationsRequest.page_size, use next_page_token as the value for the ListDeviceOperationsRequest.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. 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.

Was the article helpful?

Language / Region
Yandex project
© 2023 Yandex.Cloud LLC
In this article:
  • Calls DeviceService
  • Get
  • GetDeviceRequest
  • Device
  • DeviceMonitoringData
  • GetByName
  • GetByNameDeviceRequest
  • Device
  • DeviceMonitoringData
  • List
  • ListDevicesRequest
  • ListDevicesResponse
  • Device
  • DeviceMonitoringData
  • Create
  • CreateDeviceRequest
  • Certificate
  • Operation
  • CreateDeviceMetadata
  • Device
  • DeviceMonitoringData
  • Update
  • UpdateDeviceRequest
  • Operation
  • UpdateDeviceMetadata
  • Device
  • DeviceMonitoringData
  • Delete
  • DeleteDeviceRequest
  • Operation
  • DeleteDeviceMetadata
  • ListCertificates
  • ListDeviceCertificatesRequest
  • ListDeviceCertificatesResponse
  • DeviceCertificate
  • AddCertificate
  • AddDeviceCertificateRequest
  • Operation
  • AddDeviceCertificateMetadata
  • DeviceCertificate
  • DeleteCertificate
  • DeleteDeviceCertificateRequest
  • Operation
  • DeleteDeviceCertificateMetadata
  • ListPasswords
  • ListDevicePasswordsRequest
  • ListDevicePasswordsResponse
  • DevicePassword
  • AddPassword
  • AddDevicePasswordRequest
  • Operation
  • AddDevicePasswordMetadata
  • DevicePassword
  • DeletePassword
  • DeleteDevicePasswordRequest
  • Operation
  • DeleteDevicePasswordMetadata
  • ListOperations
  • ListDeviceOperationsRequest
  • ListDeviceOperationsResponse
  • Operation