Azure / azure-sdk-for-rust

This repository is for the active development of the Azure SDK for Rust. For consumers of the SDK we recommend visiting Docs.rs and looking up the docs for any of libraries in the SDK.
MIT License
714 stars 248 forks source link

Null error on azure_mgmt_network network_watcher verefy_ip_flow #1308

Open andrecruz24 opened 1 year ago

andrecruz24 commented 1 year ago

Hello,

While trying to verify an ip flow using a network watcher, using azure_mgmt_network::package_2021_08::network_watchers verify_ip_flow, I get the following error:

Error: invalid type: null, expected struct VerificationIpFlowResult at line 1 column 4

If I put wrong values in the parameters it fails normaly with the error response from the Azure API.

I have tested the input values on the Azure Portal and it works normally.

Code to reproduce:

Parameters :

let params = VerificationIpFlowParameters {
        target_resource_id: vm_resource_id,
        direction: azure_mgmt_network::models::Direction::Inbound,
        protocol: azure_mgmt_network::models::verification_ip_flow_parameters::Protocol::Tcp,
        local_port: "3389".to_string(),
        remote_port: "5000".to_string(),
        local_ip_address: primary_ip_configuration_private_ip_address.clone(),
        remote_ip_address: "...".to_string(),
        target_nic_resource_id: Some(primary_nic_resource_id),
    };

Parameters output:

Jun 26 12:25:12.309 DEBG VerificationIpFlowParameters {
    target_resource_id: "/…",
    direction: Inbound,
    protocol: Tcp,
    local_port: "3389",
    remote_port: "5000",
    local_ip_address: "…",
    remote_ip_address: "…",
    target_nic_resource_id: Some(
        "/… ",
    ),
}

verify_ip_flow call:

let ip_flow_verify = nw_client
        .verify_ip_flow(
            nw_resource_group_name,
            nw_name,
            parameters,
            subscription_id,
        )
        .await?;
cataggar commented 1 year ago

@andrecruz24, can you try https://crates.io/crates/azure_mgmt_network/0.16.0 ?