Updating a broker
Warning
Yandex IoT Core is no longer available to new users.
Current users can create resources until November 1, 2026. Afterwards, the service will go read-only and cease to operate on December 1, 2026. For more information on the timing and procedure, see Service shutdown.
Note
The broker is at the Preview stage.
You can update a broker name or description, as well as manage broker labels.
To access a broker, use its unique ID or name. For info on how to get the unique broker ID or name, see Getting information about a broker.
Updating a broker name
- In the management console
, select the folder where you want to update the broker name. - Navigate
to IoT Core. - In the left-hand panel, select Brokers.
- To the right of the name of your broker, click
and select Edit from the drop-down list. - Edit the Name field.
- Click Save.
If you do not have the Yandex Cloud CLI yet, install and initialize it.
The folder used by default is the one specified when creating the CLI profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also specify a different folder for any command using --folder-name or --folder-id. If you access a resource by its name, the search will be limited to the default folder. If you access a resource by its ID, the search will be global, i.e., through all folders based on access permissions.
Update the broker name:
yc iot broker update my-broker --new-name test-broker
Result:
id: b91ki3851h**********
folder_id: aoek49ghmk**********
created_at: "2019-05-28T11:29:42.420Z"
name: test-broker
With Terraform
Terraform is distributed under the Business Source License
For more information about the provider resources, see the guides on the Terraform
If you do not have Terraform yet, install it and configure the Yandex Cloud provider.
To manage infrastructure using Terraform under a service account or user accounts (a Yandex account, a federated account, or a local user), authenticate using the appropriate method.
To update the name of a broker created with Terraform:
-
Open the Terraform configuration file and edit the
nameparameter value in the broker description.Here is an example of a broker description in the Terraform configuration:
resource "yandex_iot_core_broker" "my_broker" { name = "test-broker" description = "test broker for terraform provider documentation" } ... }For more on the properties of the
yandex_iot_core_brokerresource, see this provider guide. -
In the terminal, navigate to the directory where you edited the configuration file.
-
Make sure the configuration file is correct using this command:
terraform validateIf the configuration is valid, you will get this message:
Success! The configuration is valid. -
Run this command:
terraform planYou will see a list of resources and their properties. No changes will be made at this step. Terraform will show any errors in the configuration.
-
Apply the configuration changes:
terraform apply -
Type
yesand press Enter to confirm the changes.You can check the updated broker name using the management console
or this CLI command:yc iot broker list
To update a broker name, use the update REST API method for the Broker resource or the BrokerService/Update gRPC API call.
Updating a broker description
To update a broker description:
- In the management console
, select the folder where you want to update the broker description. - Navigate
to IoT Core. - In the left-hand panel, select Brokers.
- To the right of the name of your broker, click
and select Edit from the drop-down list. - Edit the Description field.
- Click Save.
If you do not have the Yandex Cloud CLI yet, install and initialize it.
Update the broker description:
yc iot broker update my-broker --description "My test broker."
Result:
id: b91ki3851h**********
folder_id: aoek49ghmk**********
created_at: "2019-05-28T11:29:42.420Z"
name: my-broker
description: My test broker.
labels:
test_label: my_broker_label
With Terraform
Terraform is distributed under the Business Source License
For more information about the provider resources, see the guides on the Terraform
If you do not have Terraform yet, install it and configure the Yandex Cloud provider.
To manage infrastructure using Terraform under a service account or user accounts (a Yandex account, a federated account, or a local user), authenticate using the appropriate method.
To update the description of a broker created with Terraform:
-
Open the Terraform configuration file and edit the
descriptionparameter value in the broker description.Here is an example of a broker description in the Terraform configuration:
resource "yandex_iot_core_broker" "my_broker" { name = "test-broker" description = "test broker for terraform provider documentation" } ... }For more on the properties of the
yandex_iot_core_brokerresource, see this provider guide. -
In the terminal, navigate to the directory where you edited the configuration file.
-
Make sure the configuration file is correct using this command:
terraform validateIf the configuration is valid, you will get this message:
Success! The configuration is valid. -
Run this command:
terraform planYou will see a list of resources and their properties. No changes will be made at this step. Terraform will show any errors in the configuration.
-
Apply the configuration changes:
terraform apply -
Type
yesand press Enter to confirm the changes.You can check the updated broker description using the management console
or this CLI command:yc iot broker get <broker_name>
To update a broker description, use the update REST API method for the Broker resource or the BrokerService/Update gRPC API call.
Managing broker labels
You can manage broker labels in the following ways:
Adding a label
- In the management console
, select the folder where you want to add a broker label. - Navigate
to IoT Core. - In the left-hand panel, select Brokers.
- To the right of the name of your broker, click
and select Edit from the drop-down list. - Fill in the Key and Value fields and click Add label.
- Click Save.
If you do not have the Yandex Cloud CLI yet, install and initialize it.
The folder used by default is the one specified when creating the CLI profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also specify a different folder for any command using --folder-name or --folder-id. If you access a resource by its name, the search will be limited to the default folder. If you access a resource by its ID, the search will be global, i.e., through all folders based on access permissions.
Add a broker label:
yc iot broker add-labels my-broker --labels new_label=test_label
Result:
id: b91ki3851h**********
folder_id: aoek49ghmk**********
created_at: "2019-05-28T11:29:42.420Z"
name: my-broker
labels:
new_label: test_label
With Terraform
Terraform is distributed under the Business Source License
For more information about the provider resources, see the guides on the Terraform
If you do not have Terraform yet, install it and configure the Yandex Cloud provider.
To manage infrastructure using Terraform under a service account or user accounts (a Yandex account, a federated account, or a local user), authenticate using the appropriate method.
To add a label to a broker created with Terraform:
-
In the configuration file, describe the resource you want to create:
-
yandex_iot_core_broker: Broker settings:name: Broker name.description: Broker description.labels: Broker labels inkey:valueformat.
Here is an example of a resource structure in the configuration file:
resource "yandex_iot_core_broker" "my_broker" { name = "test-broker" description = "test broker for terraform provider documentation" labels = { new-label = "test-label" } ... }For more on the properties of the
yandex_iot_core_brokerresource, see this provider guide. -
-
In the terminal, navigate to the directory where you edited the configuration file.
-
Make sure the configuration file is correct using this command:
terraform validateIf the configuration is valid, you will get this message:
Success! The configuration is valid. -
Run this command:
terraform planYou will see a list of resources and their properties. No changes will be made at this step. Terraform will show any errors in the configuration.
-
Apply the configuration changes:
terraform apply -
Type
yesand press Enter to confirm the changes.You can check broker labels using the following CLI command:
yc iot broker get <broker_name>
To add a label to a broker, use the update REST API method for the Broker resource or the BrokerService/Update gRPC API call.
Updating a label
- In the management console
, select the folder where you want to update a broker label. - Navigate
to IoT Core. - In the left-hand panel, select Brokers.
- To the right of the name of your broker, click
and select Edit from the drop-down list. - Edit the Key and Value fields.
- Click Save.
If you do not have the Yandex Cloud CLI yet, install and initialize it.
The folder used by default is the one specified when creating the CLI profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also specify a different folder for any command using --folder-name or --folder-id. If you access a resource by its name, the search will be limited to the default folder. If you access a resource by its ID, the search will be global, i.e., through all folders based on access permissions.
Update a broker label:
Warning
The existing labels (labels) will be completely overwritten by the ones you provide in your request.
yc iot broker update my-broker --labels test_label=my_broker_label
Result:
id: b91ki3851h**********
folder_id: aoek49ghmk**********
created_at: "2019-05-28T11:29:42.420Z"
name: my-broker
labels:
test_label: my_broker_label
With Terraform
Terraform is distributed under the Business Source License
For more information about the provider resources, see the guides on the Terraform
If you do not have Terraform yet, install it and configure the Yandex Cloud provider.
To manage infrastructure using Terraform under a service account or user accounts (a Yandex account, a federated account, or a local user), authenticate using the appropriate method.
To update a label of a broker created with Terraform:
-
Open the Terraform configuration file and edit the label value in the
labelssection of the broker description.Here is an example of a broker description in the Terraform configuration:
resource "yandex_iot_core_broker" "my_broker" { name = "test-broker" description = "test broker for terraform provider documentation" labels = { test-label = "my-broker-label" } ... }For more on the properties of the
yandex_iot_core_brokerresource, see this provider guide. -
In the terminal, navigate to the directory where you edited the configuration file.
-
Make sure the configuration file is correct using this command:
terraform validateIf the configuration is valid, you will get this message:
Success! The configuration is valid. -
Run this command:
terraform planYou will see a list of resources and their properties. No changes will be made at this step. Terraform will show any errors in the configuration.
-
Apply the configuration changes:
terraform apply -
Type
yesand press Enter to confirm the changes.You can check broker labels using the following CLI command:
yc iot broker get <broker_name>
To update a broker label, use the update REST API method for the Broker resource or the BrokerService/Update gRPC API call.
Deleting a label
- In the management console
, select the folder where you want to delete a broker label. - Navigate
to IoT Core. - In the left-hand panel, select Brokers.
- To the right of the name of your broker, click
and select Edit from the drop-down list. - To the right of the label to delete, click
. - Click Save.
If you do not have the Yandex Cloud CLI yet, install and initialize it.
The folder used by default is the one specified when creating the CLI profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also specify a different folder for any command using --folder-name or --folder-id. If you access a resource by its name, the search will be limited to the default folder. If you access a resource by its ID, the search will be global, i.e., through all folders based on access permissions.
Delete a broker label:
yc iot broker remove-labels my-broker --labels new_label
Result:
id: b91ki3851h**********
folder_id: aoek49ghmk**********
created_at: "2019-05-28T11:29:42.420Z"
name: my-broker
With Terraform
Terraform is distributed under the Business Source License
For more information about the provider resources, see the guides on the Terraform
If you do not have Terraform yet, install it and configure the Yandex Cloud provider.
To manage infrastructure using Terraform under a service account or user accounts (a Yandex account, a federated account, or a local user), authenticate using the appropriate method.
To delete a label of a broker created with Terraform:
-
Open the Terraform configuration file and delete the label value from the
labelssection of the broker description. To delete all labels, delete the entirelabelssection.Here is an example of a broker description in the Terraform configuration:
resource "yandex_iot_core_broker" "my_broker" { name = "test-broker" description = "test broker for terraform provider documentation" labels = { test-label = "my-broker-label" } ... }For more on the properties of the
yandex_iot_core_brokerresource, see this provider guide. -
In the terminal, navigate to the directory where you edited the configuration file.
-
Make sure the configuration file is correct using this command:
terraform validateIf the configuration is valid, you will get this message:
Success! The configuration is valid. -
Run this command:
terraform planYou will see a list of resources and their properties. No changes will be made at this step. Terraform will show any errors in the configuration.
-
Apply the configuration changes:
terraform apply -
Type
yesand press Enter to confirm the changes.You can check broker labels using the following CLI command:
yc iot broker get <broker_name>
To delete a broker label, use the update REST API method for the Broker resource or the BrokerService/Update gRPC API call.