pub struct OrgConnectionsAPI { /* private fields */ }
Expand description
Manage connections between organizations. Org connections allow for controlled sharing of data between different Datadog organizations. See the Cross-Organization Visibiltiy page for more information.
Implementations§
Source§impl OrgConnectionsAPI
impl OrgConnectionsAPI
pub fn new() -> Self
Sourcepub fn with_config(config: Configuration) -> Self
pub fn with_config(config: Configuration) -> Self
Examples found in repository?
More examples
examples/v2_org-connections_DeleteOrgConnections.rs (line 12)
6async fn main() {
7 // there is a valid "org_connection" in the system
8 let org_connection_data_id =
9 uuid::Uuid::parse_str(&std::env::var("ORG_CONNECTION_DATA_ID").unwrap())
10 .expect("Invalid UUID");
11 let configuration = datadog::Configuration::new();
12 let api = OrgConnectionsAPI::with_config(configuration);
13 let resp = api
14 .delete_org_connections(org_connection_data_id.clone())
15 .await;
16 if let Ok(value) = resp {
17 println!("{:#?}", value);
18 } else {
19 println!("{:#?}", resp.unwrap_err());
20 }
21}
examples/v2_org-connections_CreateOrgConnections.rs (line 28)
15async fn main() {
16 let body = OrgConnectionCreateRequest::new(OrgConnectionCreate::new(
17 OrgConnectionCreateAttributes::new(vec![OrgConnectionTypeEnum::LOGS]),
18 OrgConnectionCreateRelationships::new(
19 OrgConnectionOrgRelationship::new().data(
20 OrgConnectionOrgRelationshipData::new()
21 .id("83999dcd-7f97-11f0-8de1-1ecf66f1aa85".to_string())
22 .type_(OrgConnectionOrgRelationshipDataType::ORGS),
23 ),
24 ),
25 OrgConnectionType::ORG_CONNECTION,
26 ));
27 let configuration = datadog::Configuration::new();
28 let api = OrgConnectionsAPI::with_config(configuration);
29 let resp = api.create_org_connections(body).await;
30 if let Ok(value) = resp {
31 println!("{:#?}", value);
32 } else {
33 println!("{:#?}", resp.unwrap_err());
34 }
35}
examples/v2_org-connections_UpdateOrgConnections.rs (line 25)
11async fn main() {
12 // there is a valid "org_connection" in the system
13 let org_connection_data_id =
14 uuid::Uuid::parse_str(&std::env::var("ORG_CONNECTION_DATA_ID").unwrap())
15 .expect("Invalid UUID");
16 let body = OrgConnectionUpdateRequest::new(OrgConnectionUpdate::new(
17 OrgConnectionUpdateAttributes::new(vec![
18 OrgConnectionTypeEnum::LOGS,
19 OrgConnectionTypeEnum::METRICS,
20 ]),
21 org_connection_data_id.clone(),
22 OrgConnectionType::ORG_CONNECTION,
23 ));
24 let configuration = datadog::Configuration::new();
25 let api = OrgConnectionsAPI::with_config(configuration);
26 let resp = api
27 .update_org_connections(org_connection_data_id.clone(), body)
28 .await;
29 if let Ok(value) = resp {
30 println!("{:#?}", value);
31 } else {
32 println!("{:#?}", resp.unwrap_err());
33 }
34}
pub fn with_client_and_config( config: Configuration, client: ClientWithMiddleware, ) -> Self
Sourcepub async fn create_org_connections(
&self,
body: OrgConnectionCreateRequest,
) -> Result<OrgConnectionResponse, Error<CreateOrgConnectionsError>>
pub async fn create_org_connections( &self, body: OrgConnectionCreateRequest, ) -> Result<OrgConnectionResponse, Error<CreateOrgConnectionsError>>
Create a new org connection between the current org and a target org.
Examples found in repository?
examples/v2_org-connections_CreateOrgConnections.rs (line 29)
15async fn main() {
16 let body = OrgConnectionCreateRequest::new(OrgConnectionCreate::new(
17 OrgConnectionCreateAttributes::new(vec![OrgConnectionTypeEnum::LOGS]),
18 OrgConnectionCreateRelationships::new(
19 OrgConnectionOrgRelationship::new().data(
20 OrgConnectionOrgRelationshipData::new()
21 .id("83999dcd-7f97-11f0-8de1-1ecf66f1aa85".to_string())
22 .type_(OrgConnectionOrgRelationshipDataType::ORGS),
23 ),
24 ),
25 OrgConnectionType::ORG_CONNECTION,
26 ));
27 let configuration = datadog::Configuration::new();
28 let api = OrgConnectionsAPI::with_config(configuration);
29 let resp = api.create_org_connections(body).await;
30 if let Ok(value) = resp {
31 println!("{:#?}", value);
32 } else {
33 println!("{:#?}", resp.unwrap_err());
34 }
35}
Sourcepub async fn create_org_connections_with_http_info(
&self,
body: OrgConnectionCreateRequest,
) -> Result<ResponseContent<OrgConnectionResponse>, Error<CreateOrgConnectionsError>>
pub async fn create_org_connections_with_http_info( &self, body: OrgConnectionCreateRequest, ) -> Result<ResponseContent<OrgConnectionResponse>, Error<CreateOrgConnectionsError>>
Create a new org connection between the current org and a target org.
Sourcepub async fn delete_org_connections(
&self,
connection_id: Uuid,
) -> Result<(), Error<DeleteOrgConnectionsError>>
pub async fn delete_org_connections( &self, connection_id: Uuid, ) -> Result<(), Error<DeleteOrgConnectionsError>>
Delete an existing org connection.
Examples found in repository?
examples/v2_org-connections_DeleteOrgConnections.rs (line 14)
6async fn main() {
7 // there is a valid "org_connection" in the system
8 let org_connection_data_id =
9 uuid::Uuid::parse_str(&std::env::var("ORG_CONNECTION_DATA_ID").unwrap())
10 .expect("Invalid UUID");
11 let configuration = datadog::Configuration::new();
12 let api = OrgConnectionsAPI::with_config(configuration);
13 let resp = api
14 .delete_org_connections(org_connection_data_id.clone())
15 .await;
16 if let Ok(value) = resp {
17 println!("{:#?}", value);
18 } else {
19 println!("{:#?}", resp.unwrap_err());
20 }
21}
Sourcepub async fn delete_org_connections_with_http_info(
&self,
connection_id: Uuid,
) -> Result<ResponseContent<()>, Error<DeleteOrgConnectionsError>>
pub async fn delete_org_connections_with_http_info( &self, connection_id: Uuid, ) -> Result<ResponseContent<()>, Error<DeleteOrgConnectionsError>>
Delete an existing org connection.
Sourcepub async fn list_org_connections(
&self,
) -> Result<OrgConnectionListResponse, Error<ListOrgConnectionsError>>
pub async fn list_org_connections( &self, ) -> Result<OrgConnectionListResponse, Error<ListOrgConnectionsError>>
Returns a list of org connections.
Sourcepub async fn list_org_connections_with_http_info(
&self,
) -> Result<ResponseContent<OrgConnectionListResponse>, Error<ListOrgConnectionsError>>
pub async fn list_org_connections_with_http_info( &self, ) -> Result<ResponseContent<OrgConnectionListResponse>, Error<ListOrgConnectionsError>>
Returns a list of org connections.
Sourcepub async fn update_org_connections(
&self,
connection_id: Uuid,
body: OrgConnectionUpdateRequest,
) -> Result<OrgConnectionResponse, Error<UpdateOrgConnectionsError>>
pub async fn update_org_connections( &self, connection_id: Uuid, body: OrgConnectionUpdateRequest, ) -> Result<OrgConnectionResponse, Error<UpdateOrgConnectionsError>>
Update an existing org connection.
Examples found in repository?
examples/v2_org-connections_UpdateOrgConnections.rs (line 27)
11async fn main() {
12 // there is a valid "org_connection" in the system
13 let org_connection_data_id =
14 uuid::Uuid::parse_str(&std::env::var("ORG_CONNECTION_DATA_ID").unwrap())
15 .expect("Invalid UUID");
16 let body = OrgConnectionUpdateRequest::new(OrgConnectionUpdate::new(
17 OrgConnectionUpdateAttributes::new(vec![
18 OrgConnectionTypeEnum::LOGS,
19 OrgConnectionTypeEnum::METRICS,
20 ]),
21 org_connection_data_id.clone(),
22 OrgConnectionType::ORG_CONNECTION,
23 ));
24 let configuration = datadog::Configuration::new();
25 let api = OrgConnectionsAPI::with_config(configuration);
26 let resp = api
27 .update_org_connections(org_connection_data_id.clone(), body)
28 .await;
29 if let Ok(value) = resp {
30 println!("{:#?}", value);
31 } else {
32 println!("{:#?}", resp.unwrap_err());
33 }
34}
Sourcepub async fn update_org_connections_with_http_info(
&self,
connection_id: Uuid,
body: OrgConnectionUpdateRequest,
) -> Result<ResponseContent<OrgConnectionResponse>, Error<UpdateOrgConnectionsError>>
pub async fn update_org_connections_with_http_info( &self, connection_id: Uuid, body: OrgConnectionUpdateRequest, ) -> Result<ResponseContent<OrgConnectionResponse>, Error<UpdateOrgConnectionsError>>
Update an existing org connection.
Trait Implementations§
Source§impl Clone for OrgConnectionsAPI
impl Clone for OrgConnectionsAPI
Source§fn clone(&self) -> OrgConnectionsAPI
fn clone(&self) -> OrgConnectionsAPI
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 OrgConnectionsAPI
impl Debug for OrgConnectionsAPI
Auto Trait Implementations§
impl Freeze for OrgConnectionsAPI
impl !RefUnwindSafe for OrgConnectionsAPI
impl Send for OrgConnectionsAPI
impl Sync for OrgConnectionsAPI
impl Unpin for OrgConnectionsAPI
impl !UnwindSafe for OrgConnectionsAPI
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