pub struct GCPIntegrationAPI { /* private fields */ }Expand description
Configure your Datadog-Google Cloud Platform (GCP) integration directly through the Datadog API. Read more about the Datadog-Google Cloud Platform integration.
Implementations§
source§impl GCPIntegrationAPI
impl GCPIntegrationAPI
pub fn new() -> Self
sourcepub fn with_config(config: Configuration) -> Self
pub fn with_config(config: Configuration) -> Self
Examples found in repository?
More examples
7 8 9 10 11 12 13 14 15 16 17 18
async fn main() {
let configuration = datadog::Configuration::new();
let api = GCPIntegrationAPI::with_config(configuration);
let resp = api
.make_gcpsts_delegate(MakeGCPSTSDelegateOptionalParams::default())
.await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}8 9 10 11 12 13 14 15 16 17 18 19 20
async fn main() {
let body = BTreeMap::new();
let configuration = datadog::Configuration::new();
let api = GCPIntegrationAPI::with_config(configuration);
let resp = api
.make_gcpsts_delegate(MakeGCPSTSDelegateOptionalParams::default().body(body))
.await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
async fn main() {
let body = GCPSTSServiceAccountCreateRequest::new().data(
GCPSTSServiceAccountData::new()
.attributes(
GCPSTSServiceAccountAttributes::new()
.client_email(
"Test-252bf553ef04b351@test-project.iam.gserviceaccount.com".to_string(),
)
.host_filters(vec![]),
)
.type_(GCPServiceAccountType::GCP_SERVICE_ACCOUNT),
);
let configuration = datadog::Configuration::new();
let api = GCPIntegrationAPI::with_config(configuration);
let resp = api.create_gcpsts_account(body).await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}- examples/v2_gcp-integration_CreateGCPSTSAccount_130557025.rs
- examples/v2_gcp-integration_CreateGCPSTSAccount_2597004741.rs
- examples/v2_gcp-integration_CreateGCPSTSAccount_194782945.rs
- examples/v2_gcp-integration_CreateGCPSTSAccount_109518525.rs
- examples/v2_gcp-integration_CreateGCPSTSAccount_4235664992.rs
- examples/v2_gcp-integration_UpdateGCPSTSAccount_3205636354.rs
- examples/v2_gcp-integration_UpdateGCPSTSAccount.rs
- examples/v2_gcp-integration_UpdateGCPSTSAccount_2241994060.rs
pub fn with_client_and_config( config: Configuration, client: ClientWithMiddleware, ) -> Self
sourcepub async fn create_gcpsts_account(
&self,
body: GCPSTSServiceAccountCreateRequest,
) -> Result<GCPSTSServiceAccountResponse, Error<CreateGCPSTSAccountError>>
pub async fn create_gcpsts_account( &self, body: GCPSTSServiceAccountCreateRequest, ) -> Result<GCPSTSServiceAccountResponse, Error<CreateGCPSTSAccountError>>
Create a new entry within Datadog for your STS enabled service account.
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() {
let body = GCPSTSServiceAccountCreateRequest::new().data(
GCPSTSServiceAccountData::new()
.attributes(
GCPSTSServiceAccountAttributes::new()
.client_email(
"Test-252bf553ef04b351@test-project.iam.gserviceaccount.com".to_string(),
)
.host_filters(vec![]),
)
.type_(GCPServiceAccountType::GCP_SERVICE_ACCOUNT),
);
let configuration = datadog::Configuration::new();
let api = GCPIntegrationAPI::with_config(configuration);
let resp = api.create_gcpsts_account(body).await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}More examples
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
async fn main() {
let body = GCPSTSServiceAccountCreateRequest::new().data(
GCPSTSServiceAccountData::new()
.attributes(
GCPSTSServiceAccountAttributes::new()
.client_email(
"Test-252bf553ef04b351@test-project.iam.gserviceaccount.com".to_string(),
)
.host_filters(vec![])
.resource_collection_enabled(true),
)
.type_(GCPServiceAccountType::GCP_SERVICE_ACCOUNT),
);
let configuration = datadog::Configuration::new();
let api = GCPIntegrationAPI::with_config(configuration);
let resp = api.create_gcpsts_account(body).await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
async fn main() {
let body = GCPSTSServiceAccountCreateRequest::new().data(
GCPSTSServiceAccountData::new()
.attributes(
GCPSTSServiceAccountAttributes::new()
.client_email(
"Test-252bf553ef04b351@test-project.iam.gserviceaccount.com".to_string(),
)
.host_filters(vec![])
.is_security_command_center_enabled(true),
)
.type_(GCPServiceAccountType::GCP_SERVICE_ACCOUNT),
);
let configuration = datadog::Configuration::new();
let api = GCPIntegrationAPI::with_config(configuration);
let resp = api.create_gcpsts_account(body).await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
async fn main() {
let body = GCPSTSServiceAccountCreateRequest::new().data(
GCPSTSServiceAccountData::new()
.attributes(
GCPSTSServiceAccountAttributes::new()
.client_email(
"Test-252bf553ef04b351@test-project.iam.gserviceaccount.com".to_string(),
)
.cloud_run_revision_filters(vec!["meh:bleh".to_string()])
.host_filters(vec![]),
)
.type_(GCPServiceAccountType::GCP_SERVICE_ACCOUNT),
);
let configuration = datadog::Configuration::new();
let api = GCPIntegrationAPI::with_config(configuration);
let resp = api.create_gcpsts_account(body).await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
async fn main() {
let body = GCPSTSServiceAccountCreateRequest::new().data(
GCPSTSServiceAccountData::new()
.attributes(
GCPSTSServiceAccountAttributes::new()
.account_tags(vec!["lorem".to_string(), "ipsum".to_string()])
.client_email(
"Test-252bf553ef04b351@test-project.iam.gserviceaccount.com".to_string(),
)
.host_filters(vec![]),
)
.type_(GCPServiceAccountType::GCP_SERVICE_ACCOUNT),
);
let configuration = datadog::Configuration::new();
let api = GCPIntegrationAPI::with_config(configuration);
let resp = api.create_gcpsts_account(body).await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}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() {
let body = GCPSTSServiceAccountCreateRequest::new().data(
GCPSTSServiceAccountData::new()
.attributes(
GCPSTSServiceAccountAttributes::new()
.client_email(
"Test-252bf553ef04b351@test-project.iam.gserviceaccount.com".to_string(),
)
.host_filters(vec![])
.is_cspm_enabled(true)
.resource_collection_enabled(true),
)
.type_(GCPServiceAccountType::GCP_SERVICE_ACCOUNT),
);
let configuration = datadog::Configuration::new();
let api = GCPIntegrationAPI::with_config(configuration);
let resp = api.create_gcpsts_account(body).await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}sourcepub async fn create_gcpsts_account_with_http_info(
&self,
body: GCPSTSServiceAccountCreateRequest,
) -> Result<ResponseContent<GCPSTSServiceAccountResponse>, Error<CreateGCPSTSAccountError>>
pub async fn create_gcpsts_account_with_http_info( &self, body: GCPSTSServiceAccountCreateRequest, ) -> Result<ResponseContent<GCPSTSServiceAccountResponse>, Error<CreateGCPSTSAccountError>>
Create a new entry within Datadog for your STS enabled service account.
sourcepub async fn delete_gcpsts_account(
&self,
account_id: String,
) -> Result<(), Error<DeleteGCPSTSAccountError>>
pub async fn delete_gcpsts_account( &self, account_id: String, ) -> Result<(), Error<DeleteGCPSTSAccountError>>
Delete an STS enabled GCP account from within Datadog.
sourcepub async fn delete_gcpsts_account_with_http_info(
&self,
account_id: String,
) -> Result<ResponseContent<()>, Error<DeleteGCPSTSAccountError>>
pub async fn delete_gcpsts_account_with_http_info( &self, account_id: String, ) -> Result<ResponseContent<()>, Error<DeleteGCPSTSAccountError>>
Delete an STS enabled GCP account from within Datadog.
sourcepub async fn get_gcpsts_delegate(
&self,
) -> Result<GCPSTSDelegateAccountResponse, Error<GetGCPSTSDelegateError>>
pub async fn get_gcpsts_delegate( &self, ) -> Result<GCPSTSDelegateAccountResponse, Error<GetGCPSTSDelegateError>>
List your Datadog-GCP STS delegate account configured in your Datadog account.
sourcepub async fn get_gcpsts_delegate_with_http_info(
&self,
) -> Result<ResponseContent<GCPSTSDelegateAccountResponse>, Error<GetGCPSTSDelegateError>>
pub async fn get_gcpsts_delegate_with_http_info( &self, ) -> Result<ResponseContent<GCPSTSDelegateAccountResponse>, Error<GetGCPSTSDelegateError>>
List your Datadog-GCP STS delegate account configured in your Datadog account.
sourcepub async fn list_gcpsts_accounts(
&self,
) -> Result<GCPSTSServiceAccountsResponse, Error<ListGCPSTSAccountsError>>
pub async fn list_gcpsts_accounts( &self, ) -> Result<GCPSTSServiceAccountsResponse, Error<ListGCPSTSAccountsError>>
List all GCP STS-enabled service accounts configured in your Datadog account.
sourcepub async fn list_gcpsts_accounts_with_http_info(
&self,
) -> Result<ResponseContent<GCPSTSServiceAccountsResponse>, Error<ListGCPSTSAccountsError>>
pub async fn list_gcpsts_accounts_with_http_info( &self, ) -> Result<ResponseContent<GCPSTSServiceAccountsResponse>, Error<ListGCPSTSAccountsError>>
List all GCP STS-enabled service accounts configured in your Datadog account.
sourcepub async fn make_gcpsts_delegate(
&self,
params: MakeGCPSTSDelegateOptionalParams,
) -> Result<GCPSTSDelegateAccountResponse, Error<MakeGCPSTSDelegateError>>
pub async fn make_gcpsts_delegate( &self, params: MakeGCPSTSDelegateOptionalParams, ) -> Result<GCPSTSDelegateAccountResponse, Error<MakeGCPSTSDelegateError>>
Create a Datadog GCP principal.
Examples found in repository?
7 8 9 10 11 12 13 14 15 16 17 18
async fn main() {
let configuration = datadog::Configuration::new();
let api = GCPIntegrationAPI::with_config(configuration);
let resp = api
.make_gcpsts_delegate(MakeGCPSTSDelegateOptionalParams::default())
.await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}More examples
8 9 10 11 12 13 14 15 16 17 18 19 20
async fn main() {
let body = BTreeMap::new();
let configuration = datadog::Configuration::new();
let api = GCPIntegrationAPI::with_config(configuration);
let resp = api
.make_gcpsts_delegate(MakeGCPSTSDelegateOptionalParams::default().body(body))
.await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}sourcepub async fn make_gcpsts_delegate_with_http_info(
&self,
params: MakeGCPSTSDelegateOptionalParams,
) -> Result<ResponseContent<GCPSTSDelegateAccountResponse>, Error<MakeGCPSTSDelegateError>>
pub async fn make_gcpsts_delegate_with_http_info( &self, params: MakeGCPSTSDelegateOptionalParams, ) -> Result<ResponseContent<GCPSTSDelegateAccountResponse>, Error<MakeGCPSTSDelegateError>>
Create a Datadog GCP principal.
sourcepub async fn update_gcpsts_account(
&self,
account_id: String,
body: GCPSTSServiceAccountUpdateRequest,
) -> Result<GCPSTSServiceAccountResponse, Error<UpdateGCPSTSAccountError>>
pub async fn update_gcpsts_account( &self, account_id: String, body: GCPSTSServiceAccountUpdateRequest, ) -> Result<GCPSTSServiceAccountResponse, Error<UpdateGCPSTSAccountError>>
Update an STS enabled service 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() {
// there is a valid "gcp_sts_account" in the system
let gcp_sts_account_data_id = std::env::var("GCP_STS_ACCOUNT_DATA_ID").unwrap();
let body = GCPSTSServiceAccountUpdateRequest::new().data(
GCPSTSServiceAccountUpdateRequestData::new()
.attributes(
GCPSTSServiceAccountAttributes::new()
.client_email("Test-252bf553ef04b351@example.com".to_string())
.resource_collection_enabled(true),
)
.id(gcp_sts_account_data_id.clone())
.type_(GCPServiceAccountType::GCP_SERVICE_ACCOUNT),
);
let configuration = datadog::Configuration::new();
let api = GCPIntegrationAPI::with_config(configuration);
let resp = api
.update_gcpsts_account(gcp_sts_account_data_id.clone(), body)
.await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}More examples
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 "gcp_sts_account" in the system
let gcp_sts_account_data_id = std::env::var("GCP_STS_ACCOUNT_DATA_ID").unwrap();
let body = GCPSTSServiceAccountUpdateRequest::new().data(
GCPSTSServiceAccountUpdateRequestData::new()
.attributes(
GCPSTSServiceAccountAttributes::new()
.client_email("Test-252bf553ef04b351@example.com".to_string())
.host_filters(vec!["foo:bar".to_string()]),
)
.id(gcp_sts_account_data_id.clone())
.type_(GCPServiceAccountType::GCP_SERVICE_ACCOUNT),
);
let configuration = datadog::Configuration::new();
let api = GCPIntegrationAPI::with_config(configuration);
let resp = api
.update_gcpsts_account(gcp_sts_account_data_id.clone(), body)
.await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}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 "gcp_sts_account" in the system
let gcp_sts_account_data_id = std::env::var("GCP_STS_ACCOUNT_DATA_ID").unwrap();
let body = GCPSTSServiceAccountUpdateRequest::new().data(
GCPSTSServiceAccountUpdateRequestData::new()
.attributes(
GCPSTSServiceAccountAttributes::new()
.client_email("Test-252bf553ef04b351@example.com".to_string())
.cloud_run_revision_filters(vec!["merp:derp".to_string()]),
)
.id(gcp_sts_account_data_id.clone())
.type_(GCPServiceAccountType::GCP_SERVICE_ACCOUNT),
);
let configuration = datadog::Configuration::new();
let api = GCPIntegrationAPI::with_config(configuration);
let resp = api
.update_gcpsts_account(gcp_sts_account_data_id.clone(), body)
.await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}sourcepub async fn update_gcpsts_account_with_http_info(
&self,
account_id: String,
body: GCPSTSServiceAccountUpdateRequest,
) -> Result<ResponseContent<GCPSTSServiceAccountResponse>, Error<UpdateGCPSTSAccountError>>
pub async fn update_gcpsts_account_with_http_info( &self, account_id: String, body: GCPSTSServiceAccountUpdateRequest, ) -> Result<ResponseContent<GCPSTSServiceAccountResponse>, Error<UpdateGCPSTSAccountError>>
Update an STS enabled service account.
Trait Implementations§
source§impl Clone for GCPIntegrationAPI
impl Clone for GCPIntegrationAPI
source§fn clone(&self) -> GCPIntegrationAPI
fn clone(&self) -> GCPIntegrationAPI
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for GCPIntegrationAPI
impl Debug for GCPIntegrationAPI
Auto Trait Implementations§
impl Freeze for GCPIntegrationAPI
impl !RefUnwindSafe for GCPIntegrationAPI
impl Send for GCPIntegrationAPI
impl Sync for GCPIntegrationAPI
impl Unpin for GCPIntegrationAPI
impl !UnwindSafe for GCPIntegrationAPI
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)