pub struct SandboxApi<'a> { /* private fields */ }
Expand description
Veracode Sandbox API operations
Implementations§
Source§impl<'a> SandboxApi<'a>
impl<'a> SandboxApi<'a>
Sourcepub fn new(client: &'a VeracodeClient) -> Self
pub fn new(client: &'a VeracodeClient) -> Self
Create a new SandboxApi instance
Sourcepub async fn list_sandboxes(
&self,
application_guid: &str,
params: Option<SandboxListParams>,
) -> Result<Vec<Sandbox>, SandboxError>
pub async fn list_sandboxes( &self, application_guid: &str, params: Option<SandboxListParams>, ) -> Result<Vec<Sandbox>, SandboxError>
Sourcepub async fn get_sandbox(
&self,
application_guid: &str,
sandbox_guid: &str,
) -> Result<Sandbox, SandboxError>
pub async fn get_sandbox( &self, application_guid: &str, sandbox_guid: &str, ) -> Result<Sandbox, SandboxError>
Sourcepub async fn create_sandbox(
&self,
application_guid: &str,
request: CreateSandboxRequest,
) -> Result<Sandbox, SandboxError>
pub async fn create_sandbox( &self, application_guid: &str, request: CreateSandboxRequest, ) -> Result<Sandbox, SandboxError>
Sourcepub async fn update_sandbox(
&self,
application_guid: &str,
sandbox_guid: &str,
request: UpdateSandboxRequest,
) -> Result<Sandbox, SandboxError>
pub async fn update_sandbox( &self, application_guid: &str, sandbox_guid: &str, request: UpdateSandboxRequest, ) -> Result<Sandbox, SandboxError>
Sourcepub async fn delete_sandbox(
&self,
application_guid: &str,
sandbox_guid: &str,
) -> Result<(), SandboxError>
pub async fn delete_sandbox( &self, application_guid: &str, sandbox_guid: &str, ) -> Result<(), SandboxError>
Sourcepub async fn promote_sandbox_scan(
&self,
application_guid: &str,
sandbox_guid: &str,
delete_on_promote: bool,
) -> Result<(), SandboxError>
pub async fn promote_sandbox_scan( &self, application_guid: &str, sandbox_guid: &str, delete_on_promote: bool, ) -> Result<(), SandboxError>
Sourcepub async fn get_sandbox_scans(
&self,
application_guid: &str,
sandbox_guid: &str,
) -> Result<Vec<SandboxScan>, SandboxError>
pub async fn get_sandbox_scans( &self, application_guid: &str, sandbox_guid: &str, ) -> Result<Vec<SandboxScan>, SandboxError>
Sourcepub async fn sandbox_exists(
&self,
application_guid: &str,
sandbox_guid: &str,
) -> Result<bool, SandboxError>
pub async fn sandbox_exists( &self, application_guid: &str, sandbox_guid: &str, ) -> Result<bool, SandboxError>
Sourcepub async fn get_sandbox_by_name(
&self,
application_guid: &str,
name: &str,
) -> Result<Option<Sandbox>, SandboxError>
pub async fn get_sandbox_by_name( &self, application_guid: &str, name: &str, ) -> Result<Option<Sandbox>, SandboxError>
Source§impl<'a> SandboxApi<'a>
Convenience methods for common sandbox operations
impl<'a> SandboxApi<'a>
Convenience methods for common sandbox operations
Sourcepub async fn create_simple_sandbox(
&self,
application_guid: &str,
name: &str,
) -> Result<Sandbox, SandboxError>
pub async fn create_simple_sandbox( &self, application_guid: &str, name: &str, ) -> Result<Sandbox, SandboxError>
Sourcepub async fn create_auto_recreate_sandbox(
&self,
application_guid: &str,
name: &str,
description: Option<String>,
) -> Result<Sandbox, SandboxError>
pub async fn create_auto_recreate_sandbox( &self, application_guid: &str, name: &str, description: Option<String>, ) -> Result<Sandbox, SandboxError>
Sourcepub async fn update_sandbox_name(
&self,
application_guid: &str,
sandbox_guid: &str,
new_name: &str,
) -> Result<Sandbox, SandboxError>
pub async fn update_sandbox_name( &self, application_guid: &str, sandbox_guid: &str, new_name: &str, ) -> Result<Sandbox, SandboxError>
Sourcepub async fn count_sandboxes(
&self,
application_guid: &str,
) -> Result<usize, SandboxError>
pub async fn count_sandboxes( &self, application_guid: &str, ) -> Result<usize, SandboxError>
Sourcepub async fn get_sandbox_id_from_guid(
&self,
application_guid: &str,
sandbox_guid: &str,
) -> Result<String, SandboxError>
pub async fn get_sandbox_id_from_guid( &self, application_guid: &str, sandbox_guid: &str, ) -> Result<String, SandboxError>
Sourcepub async fn create_sandbox_if_not_exists(
&self,
application_guid: &str,
name: &str,
description: Option<String>,
) -> Result<Sandbox, SandboxError>
pub async fn create_sandbox_if_not_exists( &self, application_guid: &str, name: &str, description: Option<String>, ) -> Result<Sandbox, SandboxError>
Create sandbox if it doesn’t exist, or return existing sandbox.
This method implements the “check and create” pattern commonly needed for automated workflows.
§Arguments
application_guid
- The GUID of the applicationname
- The name of the sandboxdescription
- Optional description for new sandboxes
§Returns
A Result
containing the sandbox (existing or newly created).
Auto Trait Implementations§
impl<'a> Freeze for SandboxApi<'a>
impl<'a> !RefUnwindSafe for SandboxApi<'a>
impl<'a> Send for SandboxApi<'a>
impl<'a> Sync for SandboxApi<'a>
impl<'a> Unpin for SandboxApi<'a>
impl<'a> !UnwindSafe for SandboxApi<'a>
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