pub struct ConfluentCloudAPI { /* private fields */ }Expand description
Manage your Datadog Confluent Cloud integration accounts and account resources directly through the Datadog API. See the Confluent Cloud page for more information.
Implementations§
source§impl ConfluentCloudAPI
impl ConfluentCloudAPI
pub fn new() -> Self
sourcepub fn with_config(config: Configuration) -> Self
pub fn with_config(config: Configuration) -> Self
Examples found in repository?
More examples
6 7 8 9 10 11 12 13 14 15 16 17
async fn main() {
let configuration = datadog::Configuration::new();
let api = ConfluentCloudAPI::with_config(configuration);
let resp = api
.get_confluent_resource("account_id".to_string(), "resource_id".to_string())
.await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}6 7 8 9 10 11 12 13 14 15 16 17
async fn main() {
let configuration = datadog::Configuration::new();
let api = ConfluentCloudAPI::with_config(configuration);
let resp = api
.delete_confluent_resource("account_id".to_string(), "resource_id".to_string())
.await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}6 7 8 9 10 11 12 13 14 15 16 17 18 19
async fn main() {
// there is a valid "confluent_account" in the system
let confluent_account_data_id = std::env::var("CONFLUENT_ACCOUNT_DATA_ID").unwrap();
let configuration = datadog::Configuration::new();
let api = ConfluentCloudAPI::with_config(configuration);
let resp = api
.get_confluent_account(confluent_account_data_id.clone())
.await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}6 7 8 9 10 11 12 13 14 15 16 17 18 19
async fn main() {
// there is a valid "confluent_account" in the system
let confluent_account_data_id = std::env::var("CONFLUENT_ACCOUNT_DATA_ID").unwrap();
let configuration = datadog::Configuration::new();
let api = ConfluentCloudAPI::with_config(configuration);
let resp = api
.delete_confluent_account(confluent_account_data_id.clone())
.await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}pub fn with_client_and_config( config: Configuration, client: ClientWithMiddleware, ) -> Self
sourcepub async fn create_confluent_account(
&self,
body: ConfluentAccountCreateRequest,
) -> Result<ConfluentAccountResponse, Error<CreateConfluentAccountError>>
pub async fn create_confluent_account( &self, body: ConfluentAccountCreateRequest, ) -> Result<ConfluentAccountResponse, Error<CreateConfluentAccountError>>
Create a Confluent account.
Examples found in repository?
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
async fn main() {
let body = ConfluentAccountCreateRequest::new(ConfluentAccountCreateRequestData::new(
ConfluentAccountCreateRequestAttributes::new(
"TESTAPIKEY123".to_string(),
"test-api-secret-123".to_string(),
)
.resources(vec![ConfluentAccountResourceAttributes::new(
"kafka".to_string(),
)
.enable_custom_metrics(false)
.id("resource-id-123".to_string())
.tags(vec!["myTag".to_string(), "myTag2:myValue".to_string()])])
.tags(vec!["myTag".to_string(), "myTag2:myValue".to_string()]),
ConfluentAccountType::CONFLUENT_CLOUD_ACCOUNTS,
));
let configuration = datadog::Configuration::new();
let api = ConfluentCloudAPI::with_config(configuration);
let resp = api.create_confluent_account(body).await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}sourcepub async fn create_confluent_account_with_http_info(
&self,
body: ConfluentAccountCreateRequest,
) -> Result<ResponseContent<ConfluentAccountResponse>, Error<CreateConfluentAccountError>>
pub async fn create_confluent_account_with_http_info( &self, body: ConfluentAccountCreateRequest, ) -> Result<ResponseContent<ConfluentAccountResponse>, Error<CreateConfluentAccountError>>
Create a Confluent account.
sourcepub async fn create_confluent_resource(
&self,
account_id: String,
body: ConfluentResourceRequest,
) -> Result<ConfluentResourceResponse, Error<CreateConfluentResourceError>>
pub async fn create_confluent_resource( &self, account_id: String, body: ConfluentResourceRequest, ) -> Result<ConfluentResourceResponse, Error<CreateConfluentResourceError>>
Create a Confluent resource for the account associated with the provided ID.
Examples found in repository?
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
async fn main() {
// there is a valid "confluent_account" in the system
let confluent_account_data_id = std::env::var("CONFLUENT_ACCOUNT_DATA_ID").unwrap();
let body = ConfluentResourceRequest::new(ConfluentResourceRequestData::new(
ConfluentResourceRequestAttributes::new("kafka".to_string())
.enable_custom_metrics(false)
.tags(vec!["myTag".to_string(), "myTag2:myValue".to_string()]),
"exampleconfluentcloud".to_string(),
ConfluentResourceType::CONFLUENT_CLOUD_RESOURCES,
));
let configuration = datadog::Configuration::new();
let api = ConfluentCloudAPI::with_config(configuration);
let resp = api
.create_confluent_resource(confluent_account_data_id.clone(), body)
.await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}sourcepub async fn create_confluent_resource_with_http_info(
&self,
account_id: String,
body: ConfluentResourceRequest,
) -> Result<ResponseContent<ConfluentResourceResponse>, Error<CreateConfluentResourceError>>
pub async fn create_confluent_resource_with_http_info( &self, account_id: String, body: ConfluentResourceRequest, ) -> Result<ResponseContent<ConfluentResourceResponse>, Error<CreateConfluentResourceError>>
Create a Confluent resource for the account associated with the provided ID.
sourcepub async fn delete_confluent_account(
&self,
account_id: String,
) -> Result<(), Error<DeleteConfluentAccountError>>
pub async fn delete_confluent_account( &self, account_id: String, ) -> Result<(), Error<DeleteConfluentAccountError>>
Delete a Confluent account with the provided account ID.
Examples found in repository?
6 7 8 9 10 11 12 13 14 15 16 17 18 19
async fn main() {
// there is a valid "confluent_account" in the system
let confluent_account_data_id = std::env::var("CONFLUENT_ACCOUNT_DATA_ID").unwrap();
let configuration = datadog::Configuration::new();
let api = ConfluentCloudAPI::with_config(configuration);
let resp = api
.delete_confluent_account(confluent_account_data_id.clone())
.await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}sourcepub async fn delete_confluent_account_with_http_info(
&self,
account_id: String,
) -> Result<ResponseContent<()>, Error<DeleteConfluentAccountError>>
pub async fn delete_confluent_account_with_http_info( &self, account_id: String, ) -> Result<ResponseContent<()>, Error<DeleteConfluentAccountError>>
Delete a Confluent account with the provided account ID.
sourcepub async fn delete_confluent_resource(
&self,
account_id: String,
resource_id: String,
) -> Result<(), Error<DeleteConfluentResourceError>>
pub async fn delete_confluent_resource( &self, account_id: String, resource_id: String, ) -> Result<(), Error<DeleteConfluentResourceError>>
Delete a Confluent resource with the provided resource id for the account associated with the provided account ID.
Examples found in repository?
6 7 8 9 10 11 12 13 14 15 16 17
async fn main() {
let configuration = datadog::Configuration::new();
let api = ConfluentCloudAPI::with_config(configuration);
let resp = api
.delete_confluent_resource("account_id".to_string(), "resource_id".to_string())
.await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}sourcepub async fn delete_confluent_resource_with_http_info(
&self,
account_id: String,
resource_id: String,
) -> Result<ResponseContent<()>, Error<DeleteConfluentResourceError>>
pub async fn delete_confluent_resource_with_http_info( &self, account_id: String, resource_id: String, ) -> Result<ResponseContent<()>, Error<DeleteConfluentResourceError>>
Delete a Confluent resource with the provided resource id for the account associated with the provided account ID.
sourcepub async fn get_confluent_account(
&self,
account_id: String,
) -> Result<ConfluentAccountResponse, Error<GetConfluentAccountError>>
pub async fn get_confluent_account( &self, account_id: String, ) -> Result<ConfluentAccountResponse, Error<GetConfluentAccountError>>
Get the Confluent account with the provided account ID.
Examples found in repository?
6 7 8 9 10 11 12 13 14 15 16 17 18 19
async fn main() {
// there is a valid "confluent_account" in the system
let confluent_account_data_id = std::env::var("CONFLUENT_ACCOUNT_DATA_ID").unwrap();
let configuration = datadog::Configuration::new();
let api = ConfluentCloudAPI::with_config(configuration);
let resp = api
.get_confluent_account(confluent_account_data_id.clone())
.await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}sourcepub async fn get_confluent_account_with_http_info(
&self,
account_id: String,
) -> Result<ResponseContent<ConfluentAccountResponse>, Error<GetConfluentAccountError>>
pub async fn get_confluent_account_with_http_info( &self, account_id: String, ) -> Result<ResponseContent<ConfluentAccountResponse>, Error<GetConfluentAccountError>>
Get the Confluent account with the provided account ID.
sourcepub async fn get_confluent_resource(
&self,
account_id: String,
resource_id: String,
) -> Result<ConfluentResourceResponse, Error<GetConfluentResourceError>>
pub async fn get_confluent_resource( &self, account_id: String, resource_id: String, ) -> Result<ConfluentResourceResponse, Error<GetConfluentResourceError>>
Get a Confluent resource with the provided resource id for the account associated with the provided account ID.
Examples found in repository?
6 7 8 9 10 11 12 13 14 15 16 17
async fn main() {
let configuration = datadog::Configuration::new();
let api = ConfluentCloudAPI::with_config(configuration);
let resp = api
.get_confluent_resource("account_id".to_string(), "resource_id".to_string())
.await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}sourcepub async fn get_confluent_resource_with_http_info(
&self,
account_id: String,
resource_id: String,
) -> Result<ResponseContent<ConfluentResourceResponse>, Error<GetConfluentResourceError>>
pub async fn get_confluent_resource_with_http_info( &self, account_id: String, resource_id: String, ) -> Result<ResponseContent<ConfluentResourceResponse>, Error<GetConfluentResourceError>>
Get a Confluent resource with the provided resource id for the account associated with the provided account ID.
sourcepub async fn list_confluent_account(
&self,
) -> Result<ConfluentAccountsResponse, Error<ListConfluentAccountError>>
pub async fn list_confluent_account( &self, ) -> Result<ConfluentAccountsResponse, Error<ListConfluentAccountError>>
List Confluent accounts.
sourcepub async fn list_confluent_account_with_http_info(
&self,
) -> Result<ResponseContent<ConfluentAccountsResponse>, Error<ListConfluentAccountError>>
pub async fn list_confluent_account_with_http_info( &self, ) -> Result<ResponseContent<ConfluentAccountsResponse>, Error<ListConfluentAccountError>>
List Confluent accounts.
sourcepub async fn list_confluent_resource(
&self,
account_id: String,
) -> Result<ConfluentResourcesResponse, Error<ListConfluentResourceError>>
pub async fn list_confluent_resource( &self, account_id: String, ) -> Result<ConfluentResourcesResponse, Error<ListConfluentResourceError>>
Get a Confluent resource for the account associated with the provided ID.
sourcepub async fn list_confluent_resource_with_http_info(
&self,
account_id: String,
) -> Result<ResponseContent<ConfluentResourcesResponse>, Error<ListConfluentResourceError>>
pub async fn list_confluent_resource_with_http_info( &self, account_id: String, ) -> Result<ResponseContent<ConfluentResourcesResponse>, Error<ListConfluentResourceError>>
Get a Confluent resource for the account associated with the provided ID.
sourcepub async fn update_confluent_account(
&self,
account_id: String,
body: ConfluentAccountUpdateRequest,
) -> Result<ConfluentAccountResponse, Error<UpdateConfluentAccountError>>
pub async fn update_confluent_account( &self, account_id: String, body: ConfluentAccountUpdateRequest, ) -> Result<ConfluentAccountResponse, Error<UpdateConfluentAccountError>>
Update the Confluent account with the provided account ID.
Examples found in repository?
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
async fn main() {
// there is a valid "confluent_account" in the system
let confluent_account_data_attributes_api_key =
std::env::var("CONFLUENT_ACCOUNT_DATA_ATTRIBUTES_API_KEY").unwrap();
let confluent_account_data_id = std::env::var("CONFLUENT_ACCOUNT_DATA_ID").unwrap();
let body = ConfluentAccountUpdateRequest::new(ConfluentAccountUpdateRequestData::new(
ConfluentAccountUpdateRequestAttributes::new(
confluent_account_data_attributes_api_key.clone(),
"update-secret".to_string(),
)
.tags(vec!["updated_tag:val".to_string()]),
ConfluentAccountType::CONFLUENT_CLOUD_ACCOUNTS,
));
let configuration = datadog::Configuration::new();
let api = ConfluentCloudAPI::with_config(configuration);
let resp = api
.update_confluent_account(confluent_account_data_id.clone(), body)
.await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}sourcepub async fn update_confluent_account_with_http_info(
&self,
account_id: String,
body: ConfluentAccountUpdateRequest,
) -> Result<ResponseContent<ConfluentAccountResponse>, Error<UpdateConfluentAccountError>>
pub async fn update_confluent_account_with_http_info( &self, account_id: String, body: ConfluentAccountUpdateRequest, ) -> Result<ResponseContent<ConfluentAccountResponse>, Error<UpdateConfluentAccountError>>
Update the Confluent account with the provided account ID.
sourcepub async fn update_confluent_resource(
&self,
account_id: String,
resource_id: String,
body: ConfluentResourceRequest,
) -> Result<ConfluentResourceResponse, Error<UpdateConfluentResourceError>>
pub async fn update_confluent_resource( &self, account_id: String, resource_id: String, body: ConfluentResourceRequest, ) -> Result<ConfluentResourceResponse, Error<UpdateConfluentResourceError>>
Update a Confluent resource with the provided resource id for the account associated with the provided account ID.
Examples found in repository?
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
async fn main() {
let body = ConfluentResourceRequest::new(ConfluentResourceRequestData::new(
ConfluentResourceRequestAttributes::new("kafka".to_string())
.enable_custom_metrics(false)
.tags(vec!["myTag".to_string(), "myTag2:myValue".to_string()]),
"resource-id-123".to_string(),
ConfluentResourceType::CONFLUENT_CLOUD_RESOURCES,
));
let configuration = datadog::Configuration::new();
let api = ConfluentCloudAPI::with_config(configuration);
let resp = api
.update_confluent_resource("account_id".to_string(), "resource_id".to_string(), body)
.await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}sourcepub async fn update_confluent_resource_with_http_info(
&self,
account_id: String,
resource_id: String,
body: ConfluentResourceRequest,
) -> Result<ResponseContent<ConfluentResourceResponse>, Error<UpdateConfluentResourceError>>
pub async fn update_confluent_resource_with_http_info( &self, account_id: String, resource_id: String, body: ConfluentResourceRequest, ) -> Result<ResponseContent<ConfluentResourceResponse>, Error<UpdateConfluentResourceError>>
Update a Confluent resource with the provided resource id for the account associated with the provided account ID.
Trait Implementations§
source§impl Clone for ConfluentCloudAPI
impl Clone for ConfluentCloudAPI
source§fn clone(&self) -> ConfluentCloudAPI
fn clone(&self) -> ConfluentCloudAPI
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for ConfluentCloudAPI
impl Debug for ConfluentCloudAPI
Auto Trait Implementations§
impl Freeze for ConfluentCloudAPI
impl !RefUnwindSafe for ConfluentCloudAPI
impl Send for ConfluentCloudAPI
impl Sync for ConfluentCloudAPI
impl Unpin for ConfluentCloudAPI
impl !UnwindSafe for ConfluentCloudAPI
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
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)
clone_to_uninit)