rusoto icon indicating copy to clipboard operation
rusoto copied to clipboard

rusuto_apigateway's create_api_key is broken

Open seanmabli opened this issue 6 months ago • 0 comments

I am trying to create an API key in API Gateway with the following function:

async fn create_api_key(client: &ApiGatewayClient, name: &str) -> Result<ApiKey, Error> {
    let request = CreateApiKeyRequest {
        name: Some(name.to_string()),
        ..Default::default()
    };
    println!("request: {:?}", request);

    match client.create_api_key(request).await {
        Ok(response) => {
            println!("response: {:?}", response);
            Ok(ApiKey {
                id: response.id.expect("API key ID not found"),
                value: response.value.expect("API key value not found"),
            })
        }
        Err(e) => {
            println!("Error creating API key: {:?}", e);
            Err(Error::from(e))
        }
    }
}

When I run this function, it sucessfully creates a key in API Gateway, but the function returns the following error:

Error creating API key: ParseError("invalid type: string \"2024-08-23T14:08:13Z\", expected f64 at line 1 column 589")

seanmabli avatar Aug 23 '24 14:08 seanmabli