#[non_exhaustive]pub struct ApplicationKeyUpdateRequest {
pub data: ApplicationKeyUpdateData,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}
Expand description
Request used to update an application key.
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.data: ApplicationKeyUpdateData
Object used to update an application key.
additional_properties: BTreeMap<String, Value>
Implementations§
Source§impl ApplicationKeyUpdateRequest
impl ApplicationKeyUpdateRequest
Sourcepub fn new(data: ApplicationKeyUpdateData) -> ApplicationKeyUpdateRequest
pub fn new(data: ApplicationKeyUpdateData) -> ApplicationKeyUpdateRequest
Examples found in repository?
examples/v2_key-management_UpdateApplicationKey.rs (lines 13-18)
10async fn main() {
11 // there is a valid "application_key" in the system
12 let application_key_data_id = std::env::var("APPLICATION_KEY_DATA_ID").unwrap();
13 let body = ApplicationKeyUpdateRequest::new(ApplicationKeyUpdateData::new(
14 ApplicationKeyUpdateAttributes::new()
15 .name("Application Key for managing dashboards-updated".to_string()),
16 application_key_data_id.clone(),
17 ApplicationKeysType::APPLICATION_KEYS,
18 ));
19 let configuration = datadog::Configuration::new();
20 let api = KeyManagementAPI::with_config(configuration);
21 let resp = api
22 .update_application_key(application_key_data_id.clone(), body)
23 .await;
24 if let Ok(value) = resp {
25 println!("{:#?}", value);
26 } else {
27 println!("{:#?}", resp.unwrap_err());
28 }
29}
More examples
examples/v2_key-management_UpdateCurrentUserApplicationKey.rs (lines 13-18)
10async fn main() {
11 // there is a valid "application_key" in the system
12 let application_key_data_id = std::env::var("APPLICATION_KEY_DATA_ID").unwrap();
13 let body = ApplicationKeyUpdateRequest::new(ApplicationKeyUpdateData::new(
14 ApplicationKeyUpdateAttributes::new()
15 .name("Application Key for managing dashboards-updated".to_string()),
16 application_key_data_id.clone(),
17 ApplicationKeysType::APPLICATION_KEYS,
18 ));
19 let configuration = datadog::Configuration::new();
20 let api = KeyManagementAPI::with_config(configuration);
21 let resp = api
22 .update_current_user_application_key(application_key_data_id.clone(), body)
23 .await;
24 if let Ok(value) = resp {
25 println!("{:#?}", value);
26 } else {
27 println!("{:#?}", resp.unwrap_err());
28 }
29}
examples/v2_service-accounts_UpdateServiceAccountApplicationKey.rs (lines 17-22)
10async fn main() {
11 // there is a valid "service_account_user" in the system
12 let service_account_user_data_id = std::env::var("SERVICE_ACCOUNT_USER_DATA_ID").unwrap();
13
14 // there is a valid "service_account_application_key" for "service_account_user"
15 let service_account_application_key_data_id =
16 std::env::var("SERVICE_ACCOUNT_APPLICATION_KEY_DATA_ID").unwrap();
17 let body = ApplicationKeyUpdateRequest::new(ApplicationKeyUpdateData::new(
18 ApplicationKeyUpdateAttributes::new()
19 .name("Application Key for managing dashboards-updated".to_string()),
20 service_account_application_key_data_id.clone(),
21 ApplicationKeysType::APPLICATION_KEYS,
22 ));
23 let configuration = datadog::Configuration::new();
24 let api = ServiceAccountsAPI::with_config(configuration);
25 let resp = api
26 .update_service_account_application_key(
27 service_account_user_data_id.clone(),
28 service_account_application_key_data_id.clone(),
29 body,
30 )
31 .await;
32 if let Ok(value) = resp {
33 println!("{:#?}", value);
34 } else {
35 println!("{:#?}", resp.unwrap_err());
36 }
37}
pub fn additional_properties(self, value: BTreeMap<String, Value>) -> Self
Trait Implementations§
Source§impl Clone for ApplicationKeyUpdateRequest
impl Clone for ApplicationKeyUpdateRequest
Source§fn clone(&self) -> ApplicationKeyUpdateRequest
fn clone(&self) -> ApplicationKeyUpdateRequest
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ApplicationKeyUpdateRequest
impl Debug for ApplicationKeyUpdateRequest
Source§impl<'de> Deserialize<'de> for ApplicationKeyUpdateRequest
impl<'de> Deserialize<'de> for ApplicationKeyUpdateRequest
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for ApplicationKeyUpdateRequest
Auto Trait Implementations§
impl Freeze for ApplicationKeyUpdateRequest
impl RefUnwindSafe for ApplicationKeyUpdateRequest
impl Send for ApplicationKeyUpdateRequest
impl Sync for ApplicationKeyUpdateRequest
impl Unpin for ApplicationKeyUpdateRequest
impl UnwindSafe for ApplicationKeyUpdateRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more