Struct google_api_proto::google::cloud::asset::v1::asset_service_client::AssetServiceClient
source · pub struct AssetServiceClient<T> { /* private fields */ }
Expand description
Asset service definition.
Implementations§
source§impl<T> AssetServiceClient<T>where
T: GrpcService<BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
impl<T> AssetServiceClient<T>where
T: GrpcService<BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
pub fn new(inner: T) -> Self
pub fn with_origin(inner: T, origin: Uri) -> Self
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> AssetServiceClient<InterceptedService<T, F>>where
F: Interceptor,
T::ResponseBody: Default,
T: Service<Request<BoxBody>, Response = Response<<T as GrpcService<BoxBody>>::ResponseBody>>,
<T as Service<Request<BoxBody>>>::Error: Into<StdError> + Send + Sync,
sourcepub fn send_compressed(self, encoding: CompressionEncoding) -> Self
pub fn send_compressed(self, encoding: CompressionEncoding) -> Self
Compress requests with the given encoding.
This requires the server to support it otherwise it might respond with an error.
sourcepub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
pub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
Enable decompressing responses.
sourcepub fn max_decoding_message_size(self, limit: usize) -> Self
pub fn max_decoding_message_size(self, limit: usize) -> Self
Limits the maximum size of a decoded message.
Default: 4MB
sourcepub fn max_encoding_message_size(self, limit: usize) -> Self
pub fn max_encoding_message_size(self, limit: usize) -> Self
Limits the maximum size of an encoded message.
Default: usize::MAX
sourcepub async fn export_assets(
&mut self,
request: impl IntoRequest<ExportAssetsRequest>,
) -> Result<Response<Operation>, Status>
pub async fn export_assets( &mut self, request: impl IntoRequest<ExportAssetsRequest>, ) -> Result<Response<Operation>, Status>
Exports assets with time and resource types to a given Cloud Storage location/BigQuery table. For Cloud Storage location destinations, the output format is newline-delimited JSON. Each line represents a [google.cloud.asset.v1.Asset][google.cloud.asset.v1.Asset] in the JSON format; for BigQuery table destinations, the output table stores the fields in asset Protobuf as columns. This API implements the [google.longrunning.Operation][google.longrunning.Operation] API, which allows you to keep track of the export. We recommend intervals of at least 2 seconds with exponential retry to poll the export operation result. For regular-size resource parent, the export operation usually finishes within 5 minutes.
sourcepub async fn list_assets(
&mut self,
request: impl IntoRequest<ListAssetsRequest>,
) -> Result<Response<ListAssetsResponse>, Status>
pub async fn list_assets( &mut self, request: impl IntoRequest<ListAssetsRequest>, ) -> Result<Response<ListAssetsResponse>, Status>
Lists assets with time and resource types and returns paged results in response.
sourcepub async fn batch_get_assets_history(
&mut self,
request: impl IntoRequest<BatchGetAssetsHistoryRequest>,
) -> Result<Response<BatchGetAssetsHistoryResponse>, Status>
pub async fn batch_get_assets_history( &mut self, request: impl IntoRequest<BatchGetAssetsHistoryRequest>, ) -> Result<Response<BatchGetAssetsHistoryResponse>, Status>
Batch gets the update history of assets that overlap a time window. For IAM_POLICY content, this API outputs history when the asset and its attached IAM POLICY both exist. This can create gaps in the output history. Otherwise, this API outputs history with asset in both non-delete or deleted status. If a specified asset does not exist, this API returns an INVALID_ARGUMENT error.
sourcepub async fn create_feed(
&mut self,
request: impl IntoRequest<CreateFeedRequest>,
) -> Result<Response<Feed>, Status>
pub async fn create_feed( &mut self, request: impl IntoRequest<CreateFeedRequest>, ) -> Result<Response<Feed>, Status>
Creates a feed in a parent project/folder/organization to listen to its asset updates.
sourcepub async fn get_feed(
&mut self,
request: impl IntoRequest<GetFeedRequest>,
) -> Result<Response<Feed>, Status>
pub async fn get_feed( &mut self, request: impl IntoRequest<GetFeedRequest>, ) -> Result<Response<Feed>, Status>
Gets details about an asset feed.
sourcepub async fn list_feeds(
&mut self,
request: impl IntoRequest<ListFeedsRequest>,
) -> Result<Response<ListFeedsResponse>, Status>
pub async fn list_feeds( &mut self, request: impl IntoRequest<ListFeedsRequest>, ) -> Result<Response<ListFeedsResponse>, Status>
Lists all asset feeds in a parent project/folder/organization.
sourcepub async fn update_feed(
&mut self,
request: impl IntoRequest<UpdateFeedRequest>,
) -> Result<Response<Feed>, Status>
pub async fn update_feed( &mut self, request: impl IntoRequest<UpdateFeedRequest>, ) -> Result<Response<Feed>, Status>
Updates an asset feed configuration.
sourcepub async fn delete_feed(
&mut self,
request: impl IntoRequest<DeleteFeedRequest>,
) -> Result<Response<()>, Status>
pub async fn delete_feed( &mut self, request: impl IntoRequest<DeleteFeedRequest>, ) -> Result<Response<()>, Status>
Deletes an asset feed.
sourcepub async fn search_all_resources(
&mut self,
request: impl IntoRequest<SearchAllResourcesRequest>,
) -> Result<Response<SearchAllResourcesResponse>, Status>
pub async fn search_all_resources( &mut self, request: impl IntoRequest<SearchAllResourcesRequest>, ) -> Result<Response<SearchAllResourcesResponse>, Status>
Searches all Google Cloud resources within the specified scope, such as a
project, folder, or organization. The caller must be granted the
cloudasset.assets.searchAllResources
permission on the desired scope,
otherwise the request will be rejected.
sourcepub async fn search_all_iam_policies(
&mut self,
request: impl IntoRequest<SearchAllIamPoliciesRequest>,
) -> Result<Response<SearchAllIamPoliciesResponse>, Status>
pub async fn search_all_iam_policies( &mut self, request: impl IntoRequest<SearchAllIamPoliciesRequest>, ) -> Result<Response<SearchAllIamPoliciesResponse>, Status>
Searches all IAM policies within the specified scope, such as a project,
folder, or organization. The caller must be granted the
cloudasset.assets.searchAllIamPolicies
permission on the desired scope,
otherwise the request will be rejected.
sourcepub async fn analyze_iam_policy(
&mut self,
request: impl IntoRequest<AnalyzeIamPolicyRequest>,
) -> Result<Response<AnalyzeIamPolicyResponse>, Status>
pub async fn analyze_iam_policy( &mut self, request: impl IntoRequest<AnalyzeIamPolicyRequest>, ) -> Result<Response<AnalyzeIamPolicyResponse>, Status>
Analyzes IAM policies to answer which identities have what accesses on which resources.
sourcepub async fn analyze_iam_policy_longrunning(
&mut self,
request: impl IntoRequest<AnalyzeIamPolicyLongrunningRequest>,
) -> Result<Response<Operation>, Status>
pub async fn analyze_iam_policy_longrunning( &mut self, request: impl IntoRequest<AnalyzeIamPolicyLongrunningRequest>, ) -> Result<Response<Operation>, Status>
Analyzes IAM policies asynchronously to answer which identities have what accesses on which resources, and writes the analysis results to a Google Cloud Storage or a BigQuery destination. For Cloud Storage destination, the output format is the JSON format that represents a [AnalyzeIamPolicyResponse][google.cloud.asset.v1.AnalyzeIamPolicyResponse]. This method implements the [google.longrunning.Operation][google.longrunning.Operation], which allows you to track the operation status. We recommend intervals of at least 2 seconds with exponential backoff retry to poll the operation result. The metadata contains the metadata for the long-running operation.
sourcepub async fn analyze_move(
&mut self,
request: impl IntoRequest<AnalyzeMoveRequest>,
) -> Result<Response<AnalyzeMoveResponse>, Status>
pub async fn analyze_move( &mut self, request: impl IntoRequest<AnalyzeMoveRequest>, ) -> Result<Response<AnalyzeMoveResponse>, Status>
Analyze moving a resource to a specified destination without kicking off the actual move. The analysis is best effort depending on the user’s permissions of viewing different hierarchical policies and configurations. The policies and configuration are subject to change before the actual resource migration takes place.
sourcepub async fn query_assets(
&mut self,
request: impl IntoRequest<QueryAssetsRequest>,
) -> Result<Response<QueryAssetsResponse>, Status>
pub async fn query_assets( &mut self, request: impl IntoRequest<QueryAssetsRequest>, ) -> Result<Response<QueryAssetsResponse>, Status>
Issue a job that queries assets using a SQL statement compatible with BigQuery SQL.
If the query execution finishes within timeout and there’s no pagination,
the full query results will be returned in the QueryAssetsResponse
.
Otherwise, full query results can be obtained by issuing extra requests
with the job_reference
from the a previous QueryAssets
call.
Note, the query result has approximately 10 GB limitation enforced by BigQuery. Queries return larger results will result in errors.
sourcepub async fn create_saved_query(
&mut self,
request: impl IntoRequest<CreateSavedQueryRequest>,
) -> Result<Response<SavedQuery>, Status>
pub async fn create_saved_query( &mut self, request: impl IntoRequest<CreateSavedQueryRequest>, ) -> Result<Response<SavedQuery>, Status>
Creates a saved query in a parent project/folder/organization.
sourcepub async fn get_saved_query(
&mut self,
request: impl IntoRequest<GetSavedQueryRequest>,
) -> Result<Response<SavedQuery>, Status>
pub async fn get_saved_query( &mut self, request: impl IntoRequest<GetSavedQueryRequest>, ) -> Result<Response<SavedQuery>, Status>
Gets details about a saved query.
sourcepub async fn list_saved_queries(
&mut self,
request: impl IntoRequest<ListSavedQueriesRequest>,
) -> Result<Response<ListSavedQueriesResponse>, Status>
pub async fn list_saved_queries( &mut self, request: impl IntoRequest<ListSavedQueriesRequest>, ) -> Result<Response<ListSavedQueriesResponse>, Status>
Lists all saved queries in a parent project/folder/organization.
sourcepub async fn update_saved_query(
&mut self,
request: impl IntoRequest<UpdateSavedQueryRequest>,
) -> Result<Response<SavedQuery>, Status>
pub async fn update_saved_query( &mut self, request: impl IntoRequest<UpdateSavedQueryRequest>, ) -> Result<Response<SavedQuery>, Status>
Updates a saved query.
sourcepub async fn delete_saved_query(
&mut self,
request: impl IntoRequest<DeleteSavedQueryRequest>,
) -> Result<Response<()>, Status>
pub async fn delete_saved_query( &mut self, request: impl IntoRequest<DeleteSavedQueryRequest>, ) -> Result<Response<()>, Status>
Deletes a saved query.
sourcepub async fn batch_get_effective_iam_policies(
&mut self,
request: impl IntoRequest<BatchGetEffectiveIamPoliciesRequest>,
) -> Result<Response<BatchGetEffectiveIamPoliciesResponse>, Status>
pub async fn batch_get_effective_iam_policies( &mut self, request: impl IntoRequest<BatchGetEffectiveIamPoliciesRequest>, ) -> Result<Response<BatchGetEffectiveIamPoliciesResponse>, Status>
Gets effective IAM policies for a batch of resources.
sourcepub async fn analyze_org_policies(
&mut self,
request: impl IntoRequest<AnalyzeOrgPoliciesRequest>,
) -> Result<Response<AnalyzeOrgPoliciesResponse>, Status>
pub async fn analyze_org_policies( &mut self, request: impl IntoRequest<AnalyzeOrgPoliciesRequest>, ) -> Result<Response<AnalyzeOrgPoliciesResponse>, Status>
Analyzes organization policies under a scope.
sourcepub async fn analyze_org_policy_governed_containers(
&mut self,
request: impl IntoRequest<AnalyzeOrgPolicyGovernedContainersRequest>,
) -> Result<Response<AnalyzeOrgPolicyGovernedContainersResponse>, Status>
pub async fn analyze_org_policy_governed_containers( &mut self, request: impl IntoRequest<AnalyzeOrgPolicyGovernedContainersRequest>, ) -> Result<Response<AnalyzeOrgPolicyGovernedContainersResponse>, Status>
Analyzes organization policies governed containers (projects, folders or organization) under a scope.
sourcepub async fn analyze_org_policy_governed_assets(
&mut self,
request: impl IntoRequest<AnalyzeOrgPolicyGovernedAssetsRequest>,
) -> Result<Response<AnalyzeOrgPolicyGovernedAssetsResponse>, Status>
pub async fn analyze_org_policy_governed_assets( &mut self, request: impl IntoRequest<AnalyzeOrgPolicyGovernedAssetsRequest>, ) -> Result<Response<AnalyzeOrgPolicyGovernedAssetsResponse>, Status>
Analyzes organization policies governed assets (Google Cloud resources or policies) under a scope. This RPC supports custom constraints and the following canned constraints:
- constraints/ainotebooks.accessMode
- constraints/ainotebooks.disableFileDownloads
- constraints/ainotebooks.disableRootAccess
- constraints/ainotebooks.disableTerminal
- constraints/ainotebooks.environmentOptions
- constraints/ainotebooks.requireAutoUpgradeSchedule
- constraints/ainotebooks.restrictVpcNetworks
- constraints/compute.disableGuestAttributesAccess
- constraints/compute.disableInstanceDataAccessApis
- constraints/compute.disableNestedVirtualization
- constraints/compute.disableSerialPortAccess
- constraints/compute.disableSerialPortLogging
- constraints/compute.disableVpcExternalIpv6
- constraints/compute.requireOsLogin
- constraints/compute.requireShieldedVm
- constraints/compute.restrictLoadBalancerCreationForTypes
- constraints/compute.restrictProtocolForwardingCreationForTypes
- constraints/compute.restrictXpnProjectLienRemoval
- constraints/compute.setNewProjectDefaultToZonalDNSOnly
- constraints/compute.skipDefaultNetworkCreation
- constraints/compute.trustedImageProjects
- constraints/compute.vmCanIpForward
- constraints/compute.vmExternalIpAccess
- constraints/gcp.detailedAuditLoggingMode
- constraints/gcp.resourceLocations
- constraints/iam.allowedPolicyMemberDomains
- constraints/iam.automaticIamGrantsForDefaultServiceAccounts
- constraints/iam.disableServiceAccountCreation
- constraints/iam.disableServiceAccountKeyCreation
- constraints/iam.disableServiceAccountKeyUpload
- constraints/iam.restrictCrossProjectServiceAccountLienRemoval
- constraints/iam.serviceAccountKeyExpiryHours
- constraints/resourcemanager.accessBoundaries
- constraints/resourcemanager.allowedExportDestinations
- constraints/sql.restrictAuthorizedNetworks
- constraints/sql.restrictNoncompliantDiagnosticDataAccess
- constraints/sql.restrictNoncompliantResourceCreation
- constraints/sql.restrictPublicIp
- constraints/storage.publicAccessPrevention
- constraints/storage.restrictAuthTypes
- constraints/storage.uniformBucketLevelAccess
This RPC only returns either resources of types supported by search APIs or IAM policies.
Trait Implementations§
source§impl<T: Clone> Clone for AssetServiceClient<T>
impl<T: Clone> Clone for AssetServiceClient<T>
source§fn clone(&self) -> AssetServiceClient<T>
fn clone(&self) -> AssetServiceClient<T>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl<T> !Freeze for AssetServiceClient<T>
impl<T> RefUnwindSafe for AssetServiceClient<T>where
T: RefUnwindSafe,
impl<T> Send for AssetServiceClient<T>where
T: Send,
impl<T> Sync for AssetServiceClient<T>where
T: Sync,
impl<T> Unpin for AssetServiceClient<T>where
T: Unpin,
impl<T> UnwindSafe for AssetServiceClient<T>where
T: UnwindSafe,
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request