ネットワーク エンジニアは、IP アドレス 172.16.15.12/32 のループバック インターフェイスを構成するスクリプトを準備します。会社のセキュリティ ポリシーに準拠するには、'Content-type' を使用します。
スクリプトに「application/yang-data+json」が追加されました。ネットワーク デバイスへの接続を保護する必要があります。
この要件を満たすために、ネットワーク エンジニアはどのコード スニペットを使用する必要がありますか?


正解:A
The correct code snippet must use a secure HTTPS-based RESTCONF transaction with the YANG JSON media type. The requirement explicitly states that the content type is application/yang-data+json and that the connection to the network device must be secured. In Cisco IOS XE programmability, RESTCONF uses HTTP methods against YANG-modeled resources, and secure deployments use HTTPS rather than clear-text HTTP. A loopback interface with address 172.16.15.12/32 would be configured by sending a JSON payload that follows the selected YANG model structure, commonly an IETF or Cisco native interface model, with the correct content-type and authentication headers. The key security indicator in the option must therefore be HTTPS/TLS, not an insecure HTTP URL or a non-YANG content type. NETCONF over SSH would also be secure, but the stated content-type points to RESTCONF with JSON encoding. Option A is the valid snippet because it aligns the payload format with a secure transport. Reference topics: RESTCONF, YANG JSON encoding, application/yang-data+json, HTTPS, IOS XE programmability.