pub struct VeracodeConfig {
pub api_id: String,
pub api_key: String,
pub base_url: String,
pub rest_base_url: String,
pub xml_base_url: String,
pub region: VeracodeRegion,
pub validate_certificates: bool,
}Expand description
Configuration for the Veracode API client.
This struct contains all the necessary configuration for connecting to the Veracode APIs, including authentication credentials and regional settings. It automatically manages both REST API (api.veracode.) and XML API (analysiscenter.veracode.) endpoints based on the selected region.
Fields§
§api_id: StringYour Veracode API ID
api_key: StringYour Veracode API key (should be kept secret)
base_url: StringBase URL for the current client instance
rest_base_url: StringREST API base URL (api.veracode.*)
xml_base_url: StringXML API base URL (analysiscenter.veracode.*)
region: VeracodeRegionVeracode region for your account
validate_certificates: boolWhether to validate TLS certificates (default: true)
Implementations§
Source§impl VeracodeConfig
impl VeracodeConfig
Sourcepub fn new(api_id: String, api_key: String) -> Self
pub fn new(api_id: String, api_key: String) -> Self
Create a new configuration for the Commercial region.
This creates a configuration that supports both REST API (api.veracode.) and XML API (analysiscenter.veracode.) endpoints. The base_url defaults to REST API for most modules, while sandbox scan operations automatically use the XML API endpoint.
§Arguments
api_id- Your Veracode API IDapi_key- Your Veracode API key
§Returns
A new VeracodeConfig instance configured for the Commercial region.
Sourcepub fn with_region(self, region: VeracodeRegion) -> Self
pub fn with_region(self, region: VeracodeRegion) -> Self
Set the region for this configuration.
This will automatically update both REST and XML API URLs to match the region. All modules will use the appropriate regional endpoint for their API type.
§Arguments
region- The Veracode region to use
§Returns
The updated configuration instance (for method chaining).
Sourcepub fn with_certificate_validation_disabled(self) -> Self
pub fn with_certificate_validation_disabled(self) -> Self
Disable certificate validation for development environments.
WARNING: This should only be used in development environments with self-signed certificates. Never use this in production.
§Returns
The updated configuration instance (for method chaining).
Trait Implementations§
Source§impl Clone for VeracodeConfig
impl Clone for VeracodeConfig
Source§fn clone(&self) -> VeracodeConfig
fn clone(&self) -> VeracodeConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more