|
465 | 465 | end |
466 | 466 |
|
467 | 467 | $get_device_states = -> (project_id:, location_id:, registry_id:, device_id:) do |
468 | | - # [START iot_get_device_states] |
| 468 | + # [START iot_get_device_state] |
469 | 469 | # project_id = "Your Google Cloud project ID" |
470 | 470 | # location_id = "The Cloud region the registry is located in" |
471 | 471 | # registry_id = "The registry to get device states from" |
|
495 | 495 | else |
496 | 496 | puts "No state messages" |
497 | 497 | end |
498 | | - # [END iot_get_device_states] |
| 498 | + # [END iot_get_device_state] |
499 | 499 | end |
500 | 500 |
|
501 | 501 | $patch_es_device = -> (project_id:, location_id:, registry_id:, device_id:, cert_path:) do |
502 | | - # [START iot_patch_es_device] |
| 502 | + # [START iot_patch_es] |
503 | 503 | # project_id = "Your Google Cloud project ID" |
504 | 504 | # location_id = "The Cloud region the registry is located in" |
505 | 505 | # registry_id = "The registry to create a device in" |
|
545 | 545 | else |
546 | 546 | puts "\t\tNo certificates for device" |
547 | 547 | end |
548 | | - # [END iot_patch_es_device] |
| 548 | + # [END iot_patch_es] |
549 | 549 | end |
550 | 550 |
|
551 | 551 | $patch_rsa_device = -> (project_id:, location_id:, registry_id:, device_id:, cert_path:) do |
552 | | - # [START iot_patch_rsa_device] |
| 552 | + # [START iot_patch_rsa] |
553 | 553 | # project_id = "Your Google Cloud project ID" |
554 | 554 | # location_id = "The Cloud region the registry is located in" |
555 | 555 | # registry_id = "The registry to create a device in" |
|
593 | 593 | else |
594 | 594 | puts "\t\tNo certificates for device" |
595 | 595 | end |
596 | | - # [END iot_patch_rsa_device] |
| 596 | + # [END iot_patch_rsa] |
597 | 597 | end |
598 | 598 |
|
599 | 599 | $send_device_config = -> (project_id:, location_id:, registry_id:, device_id:, data:) do |
600 | | - # [START send_device_config] |
| 600 | + # [START iot_set_device_config] |
601 | 601 | # project_id = "Your Google Cloud project ID" |
602 | 602 | # location_id = "The Cloud region the registry is located in" |
603 | 603 | # registry_id = "The registry to get a device from" |
|
623 | 623 | # Set configuration for the provided device |
624 | 624 | iot_client.modify_cloud_to_device_config resource, config |
625 | 625 | puts "Configuration updated!" |
626 | | - # [END send_device_config] |
| 626 | + # [END iot_set_device_config] |
627 | 627 | end |
628 | 628 |
|
629 | 629 | def run_sample arguments |
|
0 commit comments