#[non_exhaustive]pub struct ActionConnectionAttributesUpdate {
pub integration: Option<ActionConnectionIntegrationUpdate>,
pub name: Option<String>,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}
Expand description
The definition of ActionConnectionAttributesUpdate
object.
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.integration: Option<ActionConnectionIntegrationUpdate>
The definition of ActionConnectionIntegrationUpdate
object.
name: Option<String>
Name of the connection
additional_properties: BTreeMap<String, Value>
Implementations§
Source§impl ActionConnectionAttributesUpdate
impl ActionConnectionAttributesUpdate
Sourcepub fn new() -> ActionConnectionAttributesUpdate
pub fn new() -> ActionConnectionAttributesUpdate
Examples found in repository?
examples/v2_action-connection_UpdateActionConnection.rs (line 19)
17async fn main() {
18 let body = UpdateActionConnectionRequest::new(ActionConnectionDataUpdate::new(
19 ActionConnectionAttributesUpdate::new()
20 .integration(ActionConnectionIntegrationUpdate::AWSIntegrationUpdate(
21 Box::new(
22 AWSIntegrationUpdate::new(AWSIntegrationType::AWS).credentials(
23 AWSCredentialsUpdate::AWSAssumeRoleUpdate(Box::new(
24 AWSAssumeRoleUpdate::new(AWSAssumeRoleType::AWSASSUMEROLE)
25 .account_id("123456789123".to_string())
26 .role("MyRoleUpdated".to_string()),
27 )),
28 ),
29 ),
30 ))
31 .name("Cassette Connection".to_string()),
32 ActionConnectionDataType::ACTION_CONNECTION,
33 ));
34 let configuration = datadog::Configuration::new();
35 let api = ActionConnectionAPI::with_config(configuration);
36 let resp = api
37 .update_action_connection("cb460d51-3c88-4e87-adac-d47131d0423d".to_string(), body)
38 .await;
39 if let Ok(value) = resp {
40 println!("{:#?}", value);
41 } else {
42 println!("{:#?}", resp.unwrap_err());
43 }
44}
Sourcepub fn integration(self, value: ActionConnectionIntegrationUpdate) -> Self
pub fn integration(self, value: ActionConnectionIntegrationUpdate) -> Self
Examples found in repository?
examples/v2_action-connection_UpdateActionConnection.rs (lines 20-30)
17async fn main() {
18 let body = UpdateActionConnectionRequest::new(ActionConnectionDataUpdate::new(
19 ActionConnectionAttributesUpdate::new()
20 .integration(ActionConnectionIntegrationUpdate::AWSIntegrationUpdate(
21 Box::new(
22 AWSIntegrationUpdate::new(AWSIntegrationType::AWS).credentials(
23 AWSCredentialsUpdate::AWSAssumeRoleUpdate(Box::new(
24 AWSAssumeRoleUpdate::new(AWSAssumeRoleType::AWSASSUMEROLE)
25 .account_id("123456789123".to_string())
26 .role("MyRoleUpdated".to_string()),
27 )),
28 ),
29 ),
30 ))
31 .name("Cassette Connection".to_string()),
32 ActionConnectionDataType::ACTION_CONNECTION,
33 ));
34 let configuration = datadog::Configuration::new();
35 let api = ActionConnectionAPI::with_config(configuration);
36 let resp = api
37 .update_action_connection("cb460d51-3c88-4e87-adac-d47131d0423d".to_string(), body)
38 .await;
39 if let Ok(value) = resp {
40 println!("{:#?}", value);
41 } else {
42 println!("{:#?}", resp.unwrap_err());
43 }
44}
Sourcepub fn name(self, value: String) -> Self
pub fn name(self, value: String) -> Self
Examples found in repository?
examples/v2_action-connection_UpdateActionConnection.rs (line 31)
17async fn main() {
18 let body = UpdateActionConnectionRequest::new(ActionConnectionDataUpdate::new(
19 ActionConnectionAttributesUpdate::new()
20 .integration(ActionConnectionIntegrationUpdate::AWSIntegrationUpdate(
21 Box::new(
22 AWSIntegrationUpdate::new(AWSIntegrationType::AWS).credentials(
23 AWSCredentialsUpdate::AWSAssumeRoleUpdate(Box::new(
24 AWSAssumeRoleUpdate::new(AWSAssumeRoleType::AWSASSUMEROLE)
25 .account_id("123456789123".to_string())
26 .role("MyRoleUpdated".to_string()),
27 )),
28 ),
29 ),
30 ))
31 .name("Cassette Connection".to_string()),
32 ActionConnectionDataType::ACTION_CONNECTION,
33 ));
34 let configuration = datadog::Configuration::new();
35 let api = ActionConnectionAPI::with_config(configuration);
36 let resp = api
37 .update_action_connection("cb460d51-3c88-4e87-adac-d47131d0423d".to_string(), body)
38 .await;
39 if let Ok(value) = resp {
40 println!("{:#?}", value);
41 } else {
42 println!("{:#?}", resp.unwrap_err());
43 }
44}
pub fn additional_properties(self, value: BTreeMap<String, Value>) -> Self
Trait Implementations§
Source§impl Clone for ActionConnectionAttributesUpdate
impl Clone for ActionConnectionAttributesUpdate
Source§fn clone(&self) -> ActionConnectionAttributesUpdate
fn clone(&self) -> ActionConnectionAttributesUpdate
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<'de> Deserialize<'de> for ActionConnectionAttributesUpdate
impl<'de> Deserialize<'de> for ActionConnectionAttributesUpdate
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 ActionConnectionAttributesUpdate
impl PartialEq for ActionConnectionAttributesUpdate
Source§fn eq(&self, other: &ActionConnectionAttributesUpdate) -> bool
fn eq(&self, other: &ActionConnectionAttributesUpdate) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.impl StructuralPartialEq for ActionConnectionAttributesUpdate
Auto Trait Implementations§
impl Freeze for ActionConnectionAttributesUpdate
impl RefUnwindSafe for ActionConnectionAttributesUpdate
impl Send for ActionConnectionAttributesUpdate
impl Sync for ActionConnectionAttributesUpdate
impl Unpin for ActionConnectionAttributesUpdate
impl UnwindSafe for ActionConnectionAttributesUpdate
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