Struct datadog_api_client::datadogV2::model::model_api_key_update_attributes::APIKeyUpdateAttributes
source · #[non_exhaustive]pub struct APIKeyUpdateAttributes {
pub name: String,
/* private fields */
}
Expand description
Attributes used to update an API 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.name: String
Name of the API key.
Implementations§
source§impl APIKeyUpdateAttributes
impl APIKeyUpdateAttributes
sourcepub fn new(name: String) -> APIKeyUpdateAttributes
pub fn new(name: String) -> APIKeyUpdateAttributes
Examples found in repository?
examples/v2_key-management_update_api_key.rs (line 14)
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
async fn main() {
// there is a valid "api_key" in the system
let api_key_data_id = std::env::var("API_KEY_DATA_ID").unwrap();
let body = APIKeyUpdateRequest::new(APIKeyUpdateData::new(
APIKeyUpdateAttributes::new("Example-Key-Management".to_string()),
api_key_data_id.clone(),
APIKeysType::API_KEYS,
));
let configuration = datadog::Configuration::new();
let api = KeyManagementAPI::with_config(configuration);
let resp = api.update_api_key(api_key_data_id.clone(), body).await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}
Trait Implementations§
source§impl Clone for APIKeyUpdateAttributes
impl Clone for APIKeyUpdateAttributes
source§fn clone(&self) -> APIKeyUpdateAttributes
fn clone(&self) -> APIKeyUpdateAttributes
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 APIKeyUpdateAttributes
impl Debug for APIKeyUpdateAttributes
source§impl<'de> Deserialize<'de> for APIKeyUpdateAttributes
impl<'de> Deserialize<'de> for APIKeyUpdateAttributes
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 APIKeyUpdateAttributes
impl PartialEq for APIKeyUpdateAttributes
source§fn eq(&self, other: &APIKeyUpdateAttributes) -> bool
fn eq(&self, other: &APIKeyUpdateAttributes) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for APIKeyUpdateAttributes
impl Serialize for APIKeyUpdateAttributes
impl StructuralPartialEq for APIKeyUpdateAttributes
Auto Trait Implementations§
impl Freeze for APIKeyUpdateAttributes
impl RefUnwindSafe for APIKeyUpdateAttributes
impl Send for APIKeyUpdateAttributes
impl Sync for APIKeyUpdateAttributes
impl Unpin for APIKeyUpdateAttributes
impl UnwindSafe for APIKeyUpdateAttributes
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)