Struct datadog_api_client::datadog::Configuration

source ·
#[non_exhaustive]
pub struct Configuration { pub server_index: usize, pub server_variables: HashMap<String, String>, pub server_operation_index: HashMap<String, usize>, pub server_operation_variables: HashMap<String, HashMap<String, String>>, pub proxy_url: Option<String>, pub enable_retry: bool, pub max_retries: u32, /* private fields */ }

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§server_index: usize§server_variables: HashMap<String, String>§server_operation_index: HashMap<String, usize>§server_operation_variables: HashMap<String, HashMap<String, String>>§proxy_url: Option<String>§enable_retry: bool§max_retries: u32

Implementations§

source§

impl Configuration

source

pub fn new() -> Self

Examples found in repository?
examples/v1_users_ListUsers.rs (line 7)
6
7
8
9
10
11
12
13
14
15
async fn main() {
    let configuration = datadog::Configuration::new();
    let api = UsersAPI::with_config(configuration);
    let resp = api.list_users().await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
More examples
Hide additional examples
examples/v1_ip-ranges_GetIPRanges.rs (line 7)
6
7
8
9
10
11
12
13
14
15
async fn main() {
    let configuration = datadog::Configuration::new();
    let api = IPRangesAPI::with_config(configuration);
    let resp = api.get_ip_ranges().await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
examples/v2_roles_ListPermissions.rs (line 7)
6
7
8
9
10
11
12
13
14
15
async fn main() {
    let configuration = datadog::Configuration::new();
    let api = RolesAPI::with_config(configuration);
    let resp = api.list_permissions().await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
examples/v1_authentication_Validate.rs (line 7)
6
7
8
9
10
11
12
13
14
15
async fn main() {
    let configuration = datadog::Configuration::new();
    let api = AuthenticationAPI::with_config(configuration);
    let resp = api.validate().await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
examples/v1_organizations_ListOrgs.rs (line 7)
6
7
8
9
10
11
12
13
14
15
async fn main() {
    let configuration = datadog::Configuration::new();
    let api = OrganizationsAPI::with_config(configuration);
    let resp = api.list_orgs().await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
examples/v2_rum_GetRUMApplications.rs (line 7)
6
7
8
9
10
11
12
13
14
15
async fn main() {
    let configuration = datadog::Configuration::new();
    let api = RUMAPI::with_config(configuration);
    let resp = api.get_rum_applications().await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
source

pub fn get_operation_host(&self, operation_str: &str) -> String

source

pub fn set_unstable_operation_enabled( &mut self, operation: &str, enabled: bool, ) -> bool

Examples found in repository?
examples/v2_api-management_ListAPIs.rs (line 9)
7
8
9
10
11
12
13
14
15
16
17
async fn main() {
    let mut configuration = datadog::Configuration::new();
    configuration.set_unstable_operation_enabled("v2.ListAPIs", true);
    let api = APIManagementAPI::with_config(configuration);
    let resp = api.list_apis(ListAPIsOptionalParams::default()).await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
More examples
Hide additional examples
examples/v2_usage-metering_GetActiveBillingDimensions.rs (line 8)
6
7
8
9
10
11
12
13
14
15
16
async fn main() {
    let mut configuration = datadog::Configuration::new();
    configuration.set_unstable_operation_enabled("v2.GetActiveBillingDimensions", true);
    let api = UsageMeteringAPI::with_config(configuration);
    let resp = api.get_active_billing_dimensions().await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
examples/v2_incidents_ListIncidents.rs (line 9)
7
8
9
10
11
12
13
14
15
16
17
18
19
async fn main() {
    let mut configuration = datadog::Configuration::new();
    configuration.set_unstable_operation_enabled("v2.ListIncidents", true);
    let api = IncidentsAPI::with_config(configuration);
    let resp = api
        .list_incidents(ListIncidentsOptionalParams::default())
        .await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
examples/v2_security-monitoring_ListFindings.rs (line 9)
7
8
9
10
11
12
13
14
15
16
17
18
19
async fn main() {
    let mut configuration = datadog::Configuration::new();
    configuration.set_unstable_operation_enabled("v2.ListFindings", true);
    let api = SecurityMonitoringAPI::with_config(configuration);
    let resp = api
        .list_findings(ListFindingsOptionalParams::default())
        .await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
examples/v2_service-level-objectives_GetSLOReport.rs (line 8)
6
7
8
9
10
11
12
13
14
15
16
17
18
async fn main() {
    let mut configuration = datadog::Configuration::new();
    configuration.set_unstable_operation_enabled("v2.GetSLOReport", true);
    let api = ServiceLevelObjectivesAPI::with_config(configuration);
    let resp = api
        .get_slo_report("9fb2dc2a-ead0-11ee-a174-9fe3a9d7627f".to_string())
        .await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
examples/v2_service-scorecards_ListScorecardRules.rs (line 9)
7
8
9
10
11
12
13
14
15
16
17
18
19
async fn main() {
    let mut configuration = datadog::Configuration::new();
    configuration.set_unstable_operation_enabled("v2.ListScorecardRules", true);
    let api = ServiceScorecardsAPI::with_config(configuration);
    let resp = api
        .list_scorecard_rules(ListScorecardRulesOptionalParams::default())
        .await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
source

pub fn is_unstable_operation_enabled(&self, operation: &str) -> bool

source

pub fn is_unstable_operation(&self, operation: &str) -> bool

source

pub fn set_auth_key(&mut self, operation_str: &str, api_key: APIKey)

source

pub fn set_proxy_url(&mut self, proxy_url: Option<String>)

source

pub fn set_retry(&mut self, enable_retry: bool, max_retries: u32)

Trait Implementations§

source§

impl Clone for Configuration

source§

fn clone(&self) -> Configuration

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Configuration

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Configuration

source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

source§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more