#[non_exhaustive]pub struct AWSEventBridgeCreateRequest {
pub account_id: Option<String>,
pub create_event_bus: Option<bool>,
pub event_generator_name: Option<String>,
pub region: Option<String>,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}
Expand description
An object used to create an EventBridge source.
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.account_id: Option<String>
Your AWS Account ID without dashes.
create_event_bus: Option<bool>
True if Datadog should create the event bus in addition to the event
source. Requires the events:CreateEventBus
permission.
event_generator_name: Option<String>
The given part of the event source name, which is then combined with an assigned suffix to form the full name.
region: Option<String>
The event source’s AWS region.
additional_properties: BTreeMap<String, Value>
Implementations§
Source§impl AWSEventBridgeCreateRequest
impl AWSEventBridgeCreateRequest
Sourcepub fn new() -> AWSEventBridgeCreateRequest
pub fn new() -> AWSEventBridgeCreateRequest
Examples found in repository?
examples/v1_aws-integration_CreateAWSEventBridgeSource.rs (line 8)
7async fn main() {
8 let body = AWSEventBridgeCreateRequest::new()
9 .account_id("123456789012".to_string())
10 .create_event_bus(true)
11 .event_generator_name("app-alerts".to_string())
12 .region("us-east-1".to_string());
13 let configuration = datadog::Configuration::new();
14 let api = AWSIntegrationAPI::with_config(configuration);
15 let resp = api.create_aws_event_bridge_source(body).await;
16 if let Ok(value) = resp {
17 println!("{:#?}", value);
18 } else {
19 println!("{:#?}", resp.unwrap_err());
20 }
21}
Sourcepub fn account_id(self, value: String) -> Self
pub fn account_id(self, value: String) -> Self
Examples found in repository?
examples/v1_aws-integration_CreateAWSEventBridgeSource.rs (line 9)
7async fn main() {
8 let body = AWSEventBridgeCreateRequest::new()
9 .account_id("123456789012".to_string())
10 .create_event_bus(true)
11 .event_generator_name("app-alerts".to_string())
12 .region("us-east-1".to_string());
13 let configuration = datadog::Configuration::new();
14 let api = AWSIntegrationAPI::with_config(configuration);
15 let resp = api.create_aws_event_bridge_source(body).await;
16 if let Ok(value) = resp {
17 println!("{:#?}", value);
18 } else {
19 println!("{:#?}", resp.unwrap_err());
20 }
21}
Sourcepub fn create_event_bus(self, value: bool) -> Self
pub fn create_event_bus(self, value: bool) -> Self
Examples found in repository?
examples/v1_aws-integration_CreateAWSEventBridgeSource.rs (line 10)
7async fn main() {
8 let body = AWSEventBridgeCreateRequest::new()
9 .account_id("123456789012".to_string())
10 .create_event_bus(true)
11 .event_generator_name("app-alerts".to_string())
12 .region("us-east-1".to_string());
13 let configuration = datadog::Configuration::new();
14 let api = AWSIntegrationAPI::with_config(configuration);
15 let resp = api.create_aws_event_bridge_source(body).await;
16 if let Ok(value) = resp {
17 println!("{:#?}", value);
18 } else {
19 println!("{:#?}", resp.unwrap_err());
20 }
21}
Sourcepub fn event_generator_name(self, value: String) -> Self
pub fn event_generator_name(self, value: String) -> Self
Examples found in repository?
examples/v1_aws-integration_CreateAWSEventBridgeSource.rs (line 11)
7async fn main() {
8 let body = AWSEventBridgeCreateRequest::new()
9 .account_id("123456789012".to_string())
10 .create_event_bus(true)
11 .event_generator_name("app-alerts".to_string())
12 .region("us-east-1".to_string());
13 let configuration = datadog::Configuration::new();
14 let api = AWSIntegrationAPI::with_config(configuration);
15 let resp = api.create_aws_event_bridge_source(body).await;
16 if let Ok(value) = resp {
17 println!("{:#?}", value);
18 } else {
19 println!("{:#?}", resp.unwrap_err());
20 }
21}
Sourcepub fn region(self, value: String) -> Self
pub fn region(self, value: String) -> Self
Examples found in repository?
examples/v1_aws-integration_CreateAWSEventBridgeSource.rs (line 12)
7async fn main() {
8 let body = AWSEventBridgeCreateRequest::new()
9 .account_id("123456789012".to_string())
10 .create_event_bus(true)
11 .event_generator_name("app-alerts".to_string())
12 .region("us-east-1".to_string());
13 let configuration = datadog::Configuration::new();
14 let api = AWSIntegrationAPI::with_config(configuration);
15 let resp = api.create_aws_event_bridge_source(body).await;
16 if let Ok(value) = resp {
17 println!("{:#?}", value);
18 } else {
19 println!("{:#?}", resp.unwrap_err());
20 }
21}
pub fn additional_properties(self, value: BTreeMap<String, Value>) -> Self
Trait Implementations§
Source§impl Clone for AWSEventBridgeCreateRequest
impl Clone for AWSEventBridgeCreateRequest
Source§fn clone(&self) -> AWSEventBridgeCreateRequest
fn clone(&self) -> AWSEventBridgeCreateRequest
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 AWSEventBridgeCreateRequest
impl Debug for AWSEventBridgeCreateRequest
Source§impl<'de> Deserialize<'de> for AWSEventBridgeCreateRequest
impl<'de> Deserialize<'de> for AWSEventBridgeCreateRequest
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 AWSEventBridgeCreateRequest
Auto Trait Implementations§
impl Freeze for AWSEventBridgeCreateRequest
impl RefUnwindSafe for AWSEventBridgeCreateRequest
impl Send for AWSEventBridgeCreateRequest
impl Sync for AWSEventBridgeCreateRequest
impl Unpin for AWSEventBridgeCreateRequest
impl UnwindSafe for AWSEventBridgeCreateRequest
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