Struct datadog_api_client::datadogV2::model::model_application_key_update_data::ApplicationKeyUpdateData
source · #[non_exhaustive]pub struct ApplicationKeyUpdateData {
pub attributes: ApplicationKeyUpdateAttributes,
pub id: String,
pub type_: ApplicationKeysType,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}Expand description
Object 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.attributes: ApplicationKeyUpdateAttributesAttributes used to update an application Key.
id: StringID of the application key.
type_: ApplicationKeysTypeApplication Keys resource type.
additional_properties: BTreeMap<String, Value>Implementations§
source§impl ApplicationKeyUpdateData
impl ApplicationKeyUpdateData
sourcepub fn new(
attributes: ApplicationKeyUpdateAttributes,
id: String,
type_: ApplicationKeysType,
) -> ApplicationKeyUpdateData
pub fn new( attributes: ApplicationKeyUpdateAttributes, id: String, type_: ApplicationKeysType, ) -> ApplicationKeyUpdateData
Examples found in repository?
examples/v2_key-management_UpdateApplicationKey.rs (lines 13-18)
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
async fn main() {
// there is a valid "application_key" in the system
let application_key_data_id = std::env::var("APPLICATION_KEY_DATA_ID").unwrap();
let body = ApplicationKeyUpdateRequest::new(ApplicationKeyUpdateData::new(
ApplicationKeyUpdateAttributes::new()
.name("Application Key for managing dashboards-updated".to_string()),
application_key_data_id.clone(),
ApplicationKeysType::APPLICATION_KEYS,
));
let configuration = datadog::Configuration::new();
let api = KeyManagementAPI::with_config(configuration);
let resp = api
.update_application_key(application_key_data_id.clone(), body)
.await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}More examples
examples/v2_key-management_UpdateCurrentUserApplicationKey.rs (lines 13-18)
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
async fn main() {
// there is a valid "application_key" in the system
let application_key_data_id = std::env::var("APPLICATION_KEY_DATA_ID").unwrap();
let body = ApplicationKeyUpdateRequest::new(ApplicationKeyUpdateData::new(
ApplicationKeyUpdateAttributes::new()
.name("Application Key for managing dashboards-updated".to_string()),
application_key_data_id.clone(),
ApplicationKeysType::APPLICATION_KEYS,
));
let configuration = datadog::Configuration::new();
let api = KeyManagementAPI::with_config(configuration);
let resp = api
.update_current_user_application_key(application_key_data_id.clone(), body)
.await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}examples/v2_service-accounts_UpdateServiceAccountApplicationKey.rs (lines 17-22)
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
async fn main() {
// there is a valid "service_account_user" in the system
let service_account_user_data_id = std::env::var("SERVICE_ACCOUNT_USER_DATA_ID").unwrap();
// there is a valid "service_account_application_key" for "service_account_user"
let service_account_application_key_data_id =
std::env::var("SERVICE_ACCOUNT_APPLICATION_KEY_DATA_ID").unwrap();
let body = ApplicationKeyUpdateRequest::new(ApplicationKeyUpdateData::new(
ApplicationKeyUpdateAttributes::new()
.name("Application Key for managing dashboards-updated".to_string()),
service_account_application_key_data_id.clone(),
ApplicationKeysType::APPLICATION_KEYS,
));
let configuration = datadog::Configuration::new();
let api = ServiceAccountsAPI::with_config(configuration);
let resp = api
.update_service_account_application_key(
service_account_user_data_id.clone(),
service_account_application_key_data_id.clone(),
body,
)
.await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}pub fn additional_properties(self, value: BTreeMap<String, Value>) -> Self
Trait Implementations§
source§impl Clone for ApplicationKeyUpdateData
impl Clone for ApplicationKeyUpdateData
source§fn clone(&self) -> ApplicationKeyUpdateData
fn clone(&self) -> ApplicationKeyUpdateData
Returns a copy 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 ApplicationKeyUpdateData
impl Debug for ApplicationKeyUpdateData
source§impl<'de> Deserialize<'de> for ApplicationKeyUpdateData
impl<'de> Deserialize<'de> for ApplicationKeyUpdateData
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
source§impl PartialEq for ApplicationKeyUpdateData
impl PartialEq for ApplicationKeyUpdateData
source§impl Serialize for ApplicationKeyUpdateData
impl Serialize for ApplicationKeyUpdateData
impl StructuralPartialEq for ApplicationKeyUpdateData
Auto Trait Implementations§
impl Freeze for ApplicationKeyUpdateData
impl RefUnwindSafe for ApplicationKeyUpdateData
impl Send for ApplicationKeyUpdateData
impl Sync for ApplicationKeyUpdateData
impl Unpin for ApplicationKeyUpdateData
impl UnwindSafe for ApplicationKeyUpdateData
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)