pub struct AuditManager { /* private fields */ }Expand description
Implements a client for the Audit Manager API.
§Example
let client = AuditManager::builder().build().await?;
// use `client` to make requests to the Audit Manager API.§Service Description
Service describing handlers for resources
§Configuration
To configure AuditManager use the with_* methods in the type returned
by builder(). The default configuration should
work for most applications. Common configuration changes include
- with_endpoint(): by default this client uses the global default endpoint
(
https://auditmanager.googleapis.com). Applications using regional endpoints or running in restricted networks (e.g. a network configured override this default. - with_credentials(): by default this client uses Application Default Credentials. Applications using custom authentication may need to override this default.
§Pooling and Cloning
AuditManager holds a connection pool internally, it is advised to
create one and the reuse it. You do not need to wrap AuditManager in
an Rc or Arc to reuse it, because it
already uses an Arc internally.
Implementations§
Source§impl AuditManager
impl AuditManager
Sourcepub fn builder() -> ClientBuilder
pub fn builder() -> ClientBuilder
Returns a builder for AuditManager.
let client = AuditManager::builder().build().await?;Sourcepub fn from_stub<T>(stub: T) -> Selfwhere
T: AuditManager + 'static,
pub fn from_stub<T>(stub: T) -> Selfwhere
T: AuditManager + 'static,
Creates a new client from the provided stub.
The most common case for calling this function is in tests mocking the client’s behavior.
Sourcepub fn enroll_resource(&self) -> EnrollResource
pub fn enroll_resource(&self) -> EnrollResource
Enrolls the customer resource(folder/project/organization) to the audit manager service by creating the audit managers Service Agent in customers workload and granting required permissions to the Service Agent. Please note that if enrollment request is made on the already enrolled workload then enrollment is executed overriding the existing set of destinations.
Sourcepub fn generate_audit_scope_report(&self) -> GenerateAuditScopeReport
pub fn generate_audit_scope_report(&self) -> GenerateAuditScopeReport
Generates a demo report highlighting different responsibilities (Google/Customer/ shared) required to be fulfilled for the customer’s workload to be compliant with the given standard.
Sourcepub fn generate_audit_report(&self) -> GenerateAuditReport
pub fn generate_audit_report(&self) -> GenerateAuditReport
Register the Audit Report generation requests and returns the OperationId using which the customer can track the report generation progress.
§Long running operations
This method is used to start, and/or poll a long-running Operation. The Working with long-running operations chapter in the user guide covers these operations in detail.
Sourcepub fn list_audit_reports(&self) -> ListAuditReports
pub fn list_audit_reports(&self) -> ListAuditReports
Lists audit reports in the selected parent scope
Sourcepub fn get_audit_report(&self) -> GetAuditReport
pub fn get_audit_report(&self) -> GetAuditReport
Get the overall audit report
Sourcepub fn get_resource_enrollment_status(&self) -> GetResourceEnrollmentStatus
pub fn get_resource_enrollment_status(&self) -> GetResourceEnrollmentStatus
Get a resource along with its enrollment status.
Sourcepub fn list_resource_enrollment_statuses(
&self,
) -> ListResourceEnrollmentStatuses
pub fn list_resource_enrollment_statuses( &self, ) -> ListResourceEnrollmentStatuses
Fetches all resources under the parent along with their enrollment.
Sourcepub fn list_controls(&self) -> ListControls
pub fn list_controls(&self) -> ListControls
Gets controls needed to be implemented to be compliant to a standard.
Sourcepub fn list_locations(&self) -> ListLocations
pub fn list_locations(&self) -> ListLocations
Lists information about the supported locations for this service. This method can be called in two ways:
- List all public locations: Use the path
GET /v1/locations. - List project-visible locations: Use the path
GET /v1/projects/{project_id}/locations. This may include public locations as well as private or other locations specifically visible to the project.
Sourcepub fn get_location(&self) -> GetLocation
pub fn get_location(&self) -> GetLocation
Gets information about a location.
Sourcepub fn list_operations(&self) -> ListOperations
pub fn list_operations(&self) -> ListOperations
Provides the Operations service functionality in this service.
Sourcepub fn get_operation(&self) -> GetOperation
pub fn get_operation(&self) -> GetOperation
Provides the Operations service functionality in this service.
Sourcepub fn delete_operation(&self) -> DeleteOperation
pub fn delete_operation(&self) -> DeleteOperation
Provides the Operations service functionality in this service.
Sourcepub fn cancel_operation(&self) -> CancelOperation
pub fn cancel_operation(&self) -> CancelOperation
Provides the Operations service functionality in this service.
Trait Implementations§
Source§impl Clone for AuditManager
impl Clone for AuditManager
Source§fn clone(&self) -> AuditManager
fn clone(&self) -> AuditManager
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more