pub struct OrganizationsAPI { /* private fields */ }
Expand description
Create, edit, and manage your organizations. Read more about multi-org accounts.
Implementations§
Source§impl OrganizationsAPI
impl OrganizationsAPI
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_organizations_UploadIdPMetadata.rs (line 10)
8async fn main() {
9 let configuration = datadog::Configuration::new();
10 let api = OrganizationsAPI::with_config(configuration);
11 let resp = api
12 .upload_idp_metadata(UploadIdPMetadataOptionalParams::default().idp_file(
13 fs::read("fixtures/organizations/saml_configurations/valid_idp_metadata.xml").unwrap(),
14 ))
15 .await;
16 if let Ok(value) = resp {
17 println!("{:#?}", value);
18 } else {
19 println!("{:#?}", resp.unwrap_err());
20 }
21}
examples/v2_organizations_UpdateOrgConfig.rs (line 17)
11async fn main() {
12 let body = OrgConfigWriteRequest::new(OrgConfigWrite::new(
13 OrgConfigWriteAttributes::new(Value::from("UTC")),
14 OrgConfigType::ORG_CONFIGS,
15 ));
16 let configuration = datadog::Configuration::new();
17 let api = OrganizationsAPI::with_config(configuration);
18 let resp = api
19 .update_org_config("monitor_timezone".to_string(), body)
20 .await;
21 if let Ok(value) = resp {
22 println!("{:#?}", value);
23 } else {
24 println!("{:#?}", resp.unwrap_err());
25 }
26}
pub fn with_client_and_config( config: Configuration, client: ClientWithMiddleware, ) -> Self
Sourcepub async fn get_org_config(
&self,
org_config_name: String,
) -> Result<OrgConfigGetResponse, Error<GetOrgConfigError>>
pub async fn get_org_config( &self, org_config_name: String, ) -> Result<OrgConfigGetResponse, Error<GetOrgConfigError>>
Return the name, description, and value of a specific Org Config.
Sourcepub async fn get_org_config_with_http_info(
&self,
org_config_name: String,
) -> Result<ResponseContent<OrgConfigGetResponse>, Error<GetOrgConfigError>>
pub async fn get_org_config_with_http_info( &self, org_config_name: String, ) -> Result<ResponseContent<OrgConfigGetResponse>, Error<GetOrgConfigError>>
Return the name, description, and value of a specific Org Config.
Sourcepub async fn list_org_configs(
&self,
) -> Result<OrgConfigListResponse, Error<ListOrgConfigsError>>
pub async fn list_org_configs( &self, ) -> Result<OrgConfigListResponse, Error<ListOrgConfigsError>>
Returns all Org Configs (name, description, and value).
Sourcepub async fn list_org_configs_with_http_info(
&self,
) -> Result<ResponseContent<OrgConfigListResponse>, Error<ListOrgConfigsError>>
pub async fn list_org_configs_with_http_info( &self, ) -> Result<ResponseContent<OrgConfigListResponse>, Error<ListOrgConfigsError>>
Returns all Org Configs (name, description, and value).
Sourcepub async fn update_org_config(
&self,
org_config_name: String,
body: OrgConfigWriteRequest,
) -> Result<OrgConfigGetResponse, Error<UpdateOrgConfigError>>
pub async fn update_org_config( &self, org_config_name: String, body: OrgConfigWriteRequest, ) -> Result<OrgConfigGetResponse, Error<UpdateOrgConfigError>>
Update the value of a specific Org Config.
Examples found in repository?
examples/v2_organizations_UpdateOrgConfig.rs (line 19)
11async fn main() {
12 let body = OrgConfigWriteRequest::new(OrgConfigWrite::new(
13 OrgConfigWriteAttributes::new(Value::from("UTC")),
14 OrgConfigType::ORG_CONFIGS,
15 ));
16 let configuration = datadog::Configuration::new();
17 let api = OrganizationsAPI::with_config(configuration);
18 let resp = api
19 .update_org_config("monitor_timezone".to_string(), body)
20 .await;
21 if let Ok(value) = resp {
22 println!("{:#?}", value);
23 } else {
24 println!("{:#?}", resp.unwrap_err());
25 }
26}
Sourcepub async fn update_org_config_with_http_info(
&self,
org_config_name: String,
body: OrgConfigWriteRequest,
) -> Result<ResponseContent<OrgConfigGetResponse>, Error<UpdateOrgConfigError>>
pub async fn update_org_config_with_http_info( &self, org_config_name: String, body: OrgConfigWriteRequest, ) -> Result<ResponseContent<OrgConfigGetResponse>, Error<UpdateOrgConfigError>>
Update the value of a specific Org Config.
Sourcepub async fn upload_idp_metadata(
&self,
params: UploadIdPMetadataOptionalParams,
) -> Result<(), Error<UploadIdPMetadataError>>
pub async fn upload_idp_metadata( &self, params: UploadIdPMetadataOptionalParams, ) -> Result<(), Error<UploadIdPMetadataError>>
Endpoint for uploading IdP metadata for SAML setup.
Use this endpoint to upload or replace IdP metadata for SAML login configuration.
Examples found in repository?
examples/v2_organizations_UploadIdPMetadata.rs (lines 12-14)
8async fn main() {
9 let configuration = datadog::Configuration::new();
10 let api = OrganizationsAPI::with_config(configuration);
11 let resp = api
12 .upload_idp_metadata(UploadIdPMetadataOptionalParams::default().idp_file(
13 fs::read("fixtures/organizations/saml_configurations/valid_idp_metadata.xml").unwrap(),
14 ))
15 .await;
16 if let Ok(value) = resp {
17 println!("{:#?}", value);
18 } else {
19 println!("{:#?}", resp.unwrap_err());
20 }
21}
Sourcepub async fn upload_idp_metadata_with_http_info(
&self,
params: UploadIdPMetadataOptionalParams,
) -> Result<ResponseContent<()>, Error<UploadIdPMetadataError>>
pub async fn upload_idp_metadata_with_http_info( &self, params: UploadIdPMetadataOptionalParams, ) -> Result<ResponseContent<()>, Error<UploadIdPMetadataError>>
Endpoint for uploading IdP metadata for SAML setup.
Use this endpoint to upload or replace IdP metadata for SAML login configuration.
Trait Implementations§
Source§impl Clone for OrganizationsAPI
impl Clone for OrganizationsAPI
Source§fn clone(&self) -> OrganizationsAPI
fn clone(&self) -> OrganizationsAPI
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 OrganizationsAPI
impl Debug for OrganizationsAPI
Auto Trait Implementations§
impl Freeze for OrganizationsAPI
impl !RefUnwindSafe for OrganizationsAPI
impl Send for OrganizationsAPI
impl Sync for OrganizationsAPI
impl Unpin for OrganizationsAPI
impl !UnwindSafe for OrganizationsAPI
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