Class: Google::Apis::CloudassetV1::CloudAssetService
- Inherits:
-
Google::Apis::Core::BaseService
- Object
- Google::Apis::Core::BaseService
- Google::Apis::CloudassetV1::CloudAssetService
- Defined in:
- lib/google/apis/cloudasset_v1/service.rb
Overview
Cloud Asset API
The Cloud Asset API manages the history and inventory of Google Cloud resources.
Constant Summary collapse
- DEFAULT_ENDPOINT_TEMPLATE =
"https://cloudasset.$UNIVERSE_DOMAIN$/"
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
Available to use for quota purposes for server-side applications.
Instance Method Summary collapse
-
#analyze_iam_policy(scope, analysis_query_access_selector_permissions: nil, analysis_query_access_selector_roles: nil, analysis_query_condition_context_access_time: nil, analysis_query_identity_selector_identity: nil, analysis_query_options_analyze_service_account_impersonation: nil, analysis_query_options_expand_groups: nil, analysis_query_options_expand_resources: nil, analysis_query_options_expand_roles: nil, analysis_query_options_output_group_edges: nil, analysis_query_options_output_resource_edges: nil, analysis_query_resource_selector_full_resource_name: nil, execution_timeout: nil, saved_analysis_query: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudassetV1::AnalyzeIamPolicyResponse
Analyzes IAM policies to answer which identities have what accesses on which resources.
-
#analyze_iam_policy_longrunning(scope, analyze_iam_policy_longrunning_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudassetV1::Operation
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.
-
#analyze_move(resource, destination_parent: nil, view: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudassetV1::AnalyzeMoveResponse
Analyze moving a resource to a specified destination without kicking off the actual move.
-
#analyze_org_policies(scope, constraint: nil, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudassetV1::AnalyzeOrgPoliciesResponse
Analyzes organization policies under a scope.
-
#analyze_org_policy_governed_assets(scope, constraint: nil, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudassetV1::AnalyzeOrgPolicyGovernedAssetsResponse
Analyzes organization policies governed assets (Google Cloud resources or policies) under a scope.
-
#analyze_org_policy_governed_containers(scope, constraint: nil, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudassetV1::AnalyzeOrgPolicyGovernedContainersResponse
Analyzes organization policies governed containers (projects, folders or organization) under a scope.
-
#batch_effective_iam_policy_get(scope, names: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudassetV1::BatchGetEffectiveIamPoliciesResponse
Gets effective IAM policies for a batch of resources.
-
#batch_get_assets_history(parent, asset_names: nil, content_type: nil, read_time_window_end_time: nil, read_time_window_start_time: nil, relationship_types: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudassetV1::BatchGetAssetsHistoryResponse
Batch gets the update history of assets that overlap a time window.
-
#cancel_operation(name, cancel_operation_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudassetV1::Empty
Starts asynchronous cancellation on a long-running operation.
-
#create_feed(parent, create_feed_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudassetV1::Feed
Creates a feed in a parent project/folder/organization to listen to its asset updates.
-
#create_saved_query(parent, saved_query_object = nil, saved_query_id: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudassetV1::SavedQuery
Creates a saved query in a parent project/folder/organization.
-
#delete_feed(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudassetV1::Empty
Deletes an asset feed.
-
#delete_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudassetV1::Empty
Deletes a long-running operation.
-
#delete_saved_query(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudassetV1::Empty
Deletes a saved query.
-
#export_assets(parent, export_assets_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudassetV1::Operation
Exports assets with time and resource types to a given Cloud Storage location/ BigQuery table.
-
#get_feed(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudassetV1::Feed
Gets details about an asset feed.
-
#get_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudassetV1::Operation
Gets the latest state of a long-running operation.
-
#get_saved_query(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudassetV1::SavedQuery
Gets details about a saved query.
-
#initialize ⇒ CloudAssetService
constructor
A new instance of CloudAssetService.
-
#list_assets(parent, asset_types: nil, content_type: nil, page_size: nil, page_token: nil, read_time: nil, relationship_types: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudassetV1::ListAssetsResponse
Lists assets with time and resource types and returns paged results in response.
-
#list_feeds(parent, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudassetV1::ListFeedsResponse
Lists all asset feeds in a parent project/folder/organization.
-
#list_saved_queries(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudassetV1::ListSavedQueriesResponse
Lists all saved queries in a parent project/folder/organization.
-
#patch_feed(name, update_feed_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudassetV1::Feed
Updates an asset feed configuration.
-
#patch_saved_query(name, saved_query_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudassetV1::SavedQuery
Updates a saved query.
-
#query_assets(parent, query_assets_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudassetV1::QueryAssetsResponse
Issue a job that queries assets using a SQL statement compatible with BigQuery SQL.
-
#search_all_iam_policies(scope, asset_types: nil, order_by: nil, page_size: nil, page_token: nil, query: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudassetV1::SearchAllIamPoliciesResponse
Searches all IAM policies within the specified scope, such as a project, folder, or organization.
-
#search_all_resources(scope, asset_types: nil, order_by: nil, page_size: nil, page_token: nil, query: nil, read_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudassetV1::SearchAllResourcesResponse
Searches all Google Cloud resources within the specified scope, such as a project, folder, or organization.
Constructor Details
#initialize ⇒ CloudAssetService
Returns a new instance of CloudAssetService.
48 49 50 51 52 53 |
# File 'lib/google/apis/cloudasset_v1/service.rb', line 48 def initialize super(DEFAULT_ENDPOINT_TEMPLATE, '', client_name: 'google-apis-cloudasset_v1', client_version: Google::Apis::CloudassetV1::GEM_VERSION) @batch_path = 'batch' end |
Instance Attribute Details
#key ⇒ String
Returns API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
41 42 43 |
# File 'lib/google/apis/cloudasset_v1/service.rb', line 41 def key @key end |
#quota_user ⇒ String
Returns Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
46 47 48 |
# File 'lib/google/apis/cloudasset_v1/service.rb', line 46 def quota_user @quota_user end |
Instance Method Details
#analyze_iam_policy(scope, analysis_query_access_selector_permissions: nil, analysis_query_access_selector_roles: nil, analysis_query_condition_context_access_time: nil, analysis_query_identity_selector_identity: nil, analysis_query_options_analyze_service_account_impersonation: nil, analysis_query_options_expand_groups: nil, analysis_query_options_expand_resources: nil, analysis_query_options_expand_roles: nil, analysis_query_options_output_group_edges: nil, analysis_query_options_output_resource_edges: nil, analysis_query_resource_selector_full_resource_name: nil, execution_timeout: nil, saved_analysis_query: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudassetV1::AnalyzeIamPolicyResponse
Analyzes IAM policies to answer which identities have what accesses on which resources.
783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 |
# File 'lib/google/apis/cloudasset_v1/service.rb', line 783 def analyze_iam_policy(scope, analysis_query_access_selector_permissions: nil, analysis_query_access_selector_roles: nil, analysis_query_condition_context_access_time: nil, analysis_query_identity_selector_identity: nil, analysis_query_options_analyze_service_account_impersonation: nil, analysis_query_options_expand_groups: nil, analysis_query_options_expand_resources: nil, analysis_query_options_expand_roles: nil, analysis_query_options_output_group_edges: nil, analysis_query_options_output_resource_edges: nil, analysis_query_resource_selector_full_resource_name: nil, execution_timeout: nil, saved_analysis_query: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+scope}:analyzeIamPolicy', ) command.response_representation = Google::Apis::CloudassetV1::AnalyzeIamPolicyResponse::Representation command.response_class = Google::Apis::CloudassetV1::AnalyzeIamPolicyResponse command.params['scope'] = scope unless scope.nil? command.query['analysisQuery.accessSelector.permissions'] = unless .nil? command.query['analysisQuery.accessSelector.roles'] = analysis_query_access_selector_roles unless analysis_query_access_selector_roles.nil? command.query['analysisQuery.conditionContext.accessTime'] = analysis_query_condition_context_access_time unless analysis_query_condition_context_access_time.nil? command.query['analysisQuery.identitySelector.identity'] = analysis_query_identity_selector_identity unless analysis_query_identity_selector_identity.nil? command.query['analysisQuery.options.analyzeServiceAccountImpersonation'] = unless .nil? command.query['analysisQuery.options.expandGroups'] = unless .nil? command.query['analysisQuery.options.expandResources'] = unless .nil? command.query['analysisQuery.options.expandRoles'] = unless .nil? command.query['analysisQuery.options.outputGroupEdges'] = unless .nil? command.query['analysisQuery.options.outputResourceEdges'] = unless .nil? command.query['analysisQuery.resourceSelector.fullResourceName'] = analysis_query_resource_selector_full_resource_name unless analysis_query_resource_selector_full_resource_name.nil? command.query['executionTimeout'] = execution_timeout unless execution_timeout.nil? command.query['savedAnalysisQuery'] = saved_analysis_query unless saved_analysis_query.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#analyze_iam_policy_longrunning(scope, analyze_iam_policy_longrunning_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudassetV1::Operation
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. This method implements the 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.
842 843 844 845 846 847 848 849 850 851 852 |
# File 'lib/google/apis/cloudasset_v1/service.rb', line 842 def analyze_iam_policy_longrunning(scope, analyze_iam_policy_longrunning_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+scope}:analyzeIamPolicyLongrunning', ) command.request_representation = Google::Apis::CloudassetV1::AnalyzeIamPolicyLongrunningRequest::Representation command.request_object = analyze_iam_policy_longrunning_request_object command.response_representation = Google::Apis::CloudassetV1::Operation::Representation command.response_class = Google::Apis::CloudassetV1::Operation command.params['scope'] = scope unless scope.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#analyze_move(resource, destination_parent: nil, view: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudassetV1::AnalyzeMoveResponse
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.
890 891 892 893 894 895 896 897 898 899 900 |
# File 'lib/google/apis/cloudasset_v1/service.rb', line 890 def analyze_move(resource, destination_parent: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+resource}:analyzeMove', ) command.response_representation = Google::Apis::CloudassetV1::AnalyzeMoveResponse::Representation command.response_class = Google::Apis::CloudassetV1::AnalyzeMoveResponse command.params['resource'] = resource unless resource.nil? command.query['destinationParent'] = destination_parent unless destination_parent.nil? command.query['view'] = view unless view.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#analyze_org_policies(scope, constraint: nil, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudassetV1::AnalyzeOrgPoliciesResponse
Analyzes organization policies under a scope.
942 943 944 945 946 947 948 949 950 951 952 953 954 |
# File 'lib/google/apis/cloudasset_v1/service.rb', line 942 def analyze_org_policies(scope, constraint: nil, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+scope}:analyzeOrgPolicies', ) command.response_representation = Google::Apis::CloudassetV1::AnalyzeOrgPoliciesResponse::Representation command.response_class = Google::Apis::CloudassetV1::AnalyzeOrgPoliciesResponse command.params['scope'] = scope unless scope.nil? command.query['constraint'] = constraint unless constraint.nil? command.query['filter'] = filter unless filter.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#analyze_org_policy_governed_assets(scope, constraint: nil, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudassetV1::AnalyzeOrgPolicyGovernedAssetsResponse
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.
1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 |
# File 'lib/google/apis/cloudasset_v1/service.rb', line 1041 def analyze_org_policy_governed_assets(scope, constraint: nil, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+scope}:analyzeOrgPolicyGovernedAssets', ) command.response_representation = Google::Apis::CloudassetV1::AnalyzeOrgPolicyGovernedAssetsResponse::Representation command.response_class = Google::Apis::CloudassetV1::AnalyzeOrgPolicyGovernedAssetsResponse command.params['scope'] = scope unless scope.nil? command.query['constraint'] = constraint unless constraint.nil? command.query['filter'] = filter unless filter.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#analyze_org_policy_governed_containers(scope, constraint: nil, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudassetV1::AnalyzeOrgPolicyGovernedContainersResponse
Analyzes organization policies governed containers (projects, folders or organization) under a scope.
1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 |
# File 'lib/google/apis/cloudasset_v1/service.rb', line 1095 def analyze_org_policy_governed_containers(scope, constraint: nil, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+scope}:analyzeOrgPolicyGovernedContainers', ) command.response_representation = Google::Apis::CloudassetV1::AnalyzeOrgPolicyGovernedContainersResponse::Representation command.response_class = Google::Apis::CloudassetV1::AnalyzeOrgPolicyGovernedContainersResponse command.params['scope'] = scope unless scope.nil? command.query['constraint'] = constraint unless constraint.nil? command.query['filter'] = filter unless filter.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#batch_effective_iam_policy_get(scope, names: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudassetV1::BatchGetEffectiveIamPoliciesResponse
Gets effective IAM policies for a batch of resources.
170 171 172 173 174 175 176 177 178 179 |
# File 'lib/google/apis/cloudasset_v1/service.rb', line 170 def batch_effective_iam_policy_get(scope, names: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+scope}/effectiveIamPolicies:batchGet', ) command.response_representation = Google::Apis::CloudassetV1::BatchGetEffectiveIamPoliciesResponse::Representation command.response_class = Google::Apis::CloudassetV1::BatchGetEffectiveIamPoliciesResponse command.params['scope'] = scope unless scope.nil? command.query['names'] = names unless names.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#batch_get_assets_history(parent, asset_names: nil, content_type: nil, read_time_window_end_time: nil, read_time_window_start_time: nil, relationship_types: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudassetV1::BatchGetAssetsHistoryResponse
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.
1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 |
# File 'lib/google/apis/cloudasset_v1/service.rb', line 1160 def batch_get_assets_history(parent, asset_names: nil, content_type: nil, read_time_window_end_time: nil, read_time_window_start_time: nil, relationship_types: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+parent}:batchGetAssetsHistory', ) command.response_representation = Google::Apis::CloudassetV1::BatchGetAssetsHistoryResponse::Representation command.response_class = Google::Apis::CloudassetV1::BatchGetAssetsHistoryResponse command.params['parent'] = parent unless parent.nil? command.query['assetNames'] = asset_names unless asset_names.nil? command.query['contentType'] = content_type unless content_type.nil? command.query['readTimeWindow.endTime'] = read_time_window_end_time unless read_time_window_end_time.nil? command.query['readTimeWindow.startTime'] = read_time_window_start_time unless read_time_window_start_time.nil? command.query['relationshipTypes'] = relationship_types unless relationship_types.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#cancel_operation(name, cancel_operation_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudassetV1::Empty
Starts asynchronous cancellation on a long-running operation. The server makes
a best effort to cancel the operation, but success is not guaranteed. If the
server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED
.
Clients can use Operations.GetOperation or other methods to check whether the
cancellation succeeded or whether the operation completed despite cancellation.
On successful cancellation, the operation is not deleted; instead, it becomes
an operation with an Operation.error value with a google.rpc.Status.code of 1,
corresponding to Code.CANCELLED
.
379 380 381 382 383 384 385 386 387 388 389 |
# File 'lib/google/apis/cloudasset_v1/service.rb', line 379 def cancel_operation(name, cancel_operation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+name}:cancel', ) command.request_representation = Google::Apis::CloudassetV1::CancelOperationRequest::Representation command.request_object = cancel_operation_request_object command.response_representation = Google::Apis::CloudassetV1::Empty::Representation command.response_class = Google::Apis::CloudassetV1::Empty command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#create_feed(parent, create_feed_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudassetV1::Feed
Creates a feed in a parent project/folder/organization to listen to its asset updates.
206 207 208 209 210 211 212 213 214 215 216 |
# File 'lib/google/apis/cloudasset_v1/service.rb', line 206 def create_feed(parent, create_feed_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+parent}/feeds', ) command.request_representation = Google::Apis::CloudassetV1::CreateFeedRequest::Representation command.request_object = create_feed_request_object command.response_representation = Google::Apis::CloudassetV1::Feed::Representation command.response_class = Google::Apis::CloudassetV1::Feed command.params['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#create_saved_query(parent, saved_query_object = nil, saved_query_id: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudassetV1::SavedQuery
Creates a saved query in a parent project/folder/organization.
486 487 488 489 490 491 492 493 494 495 496 497 |
# File 'lib/google/apis/cloudasset_v1/service.rb', line 486 def create_saved_query(parent, saved_query_object = nil, saved_query_id: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+parent}/savedQueries', ) command.request_representation = Google::Apis::CloudassetV1::SavedQuery::Representation command.request_object = saved_query_object command.response_representation = Google::Apis::CloudassetV1::SavedQuery::Representation command.response_class = Google::Apis::CloudassetV1::SavedQuery command.params['parent'] = parent unless parent.nil? command.query['savedQueryId'] = saved_query_id unless saved_query_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#delete_feed(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudassetV1::Empty
Deletes an asset feed.
240 241 242 243 244 245 246 247 248 |
# File 'lib/google/apis/cloudasset_v1/service.rb', line 240 def delete_feed(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v1/{+name}', ) command.response_representation = Google::Apis::CloudassetV1::Empty::Representation command.response_class = Google::Apis::CloudassetV1::Empty command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#delete_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudassetV1::Empty
Deletes a long-running operation. This method indicates that the client is no
longer interested in the operation result. It does not cancel the operation.
If the server doesn't support this method, it returns google.rpc.Code.
UNIMPLEMENTED
.
414 415 416 417 418 419 420 421 422 |
# File 'lib/google/apis/cloudasset_v1/service.rb', line 414 def delete_operation(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v1/{+name}', ) command.response_representation = Google::Apis::CloudassetV1::Empty::Representation command.response_class = Google::Apis::CloudassetV1::Empty command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#delete_saved_query(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudassetV1::Empty
Deletes a saved query.
522 523 524 525 526 527 528 529 530 |
# File 'lib/google/apis/cloudasset_v1/service.rb', line 522 def delete_saved_query(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v1/{+name}', ) command.response_representation = Google::Apis::CloudassetV1::Empty::Representation command.response_class = Google::Apis::CloudassetV1::Empty command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#export_assets(parent, export_assets_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudassetV1::Operation
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 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 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.
1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 |
# File 'lib/google/apis/cloudasset_v1/service.rb', line 1207 def export_assets(parent, export_assets_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+parent}:exportAssets', ) command.request_representation = Google::Apis::CloudassetV1::ExportAssetsRequest::Representation command.request_object = export_assets_request_object command.response_representation = Google::Apis::CloudassetV1::Operation::Representation command.response_class = Google::Apis::CloudassetV1::Operation command.params['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_feed(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudassetV1::Feed
Gets details about an asset feed.
272 273 274 275 276 277 278 279 280 |
# File 'lib/google/apis/cloudasset_v1/service.rb', line 272 def get_feed(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) command.response_representation = Google::Apis::CloudassetV1::Feed::Representation command.response_class = Google::Apis::CloudassetV1::Feed command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudassetV1::Operation
Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
445 446 447 448 449 450 451 452 453 |
# File 'lib/google/apis/cloudasset_v1/service.rb', line 445 def get_operation(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) command.response_representation = Google::Apis::CloudassetV1::Operation::Representation command.response_class = Google::Apis::CloudassetV1::Operation command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_saved_query(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudassetV1::SavedQuery
Gets details about a saved query.
555 556 557 558 559 560 561 562 563 |
# File 'lib/google/apis/cloudasset_v1/service.rb', line 555 def get_saved_query(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) command.response_representation = Google::Apis::CloudassetV1::SavedQuery::Representation command.response_class = Google::Apis::CloudassetV1::SavedQuery command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_assets(parent, asset_types: nil, content_type: nil, page_size: nil, page_token: nil, read_time: nil, relationship_types: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudassetV1::ListAssetsResponse
Lists assets with time and resource types and returns paged results in response.
121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 |
# File 'lib/google/apis/cloudasset_v1/service.rb', line 121 def list_assets(parent, asset_types: nil, content_type: nil, page_size: nil, page_token: nil, read_time: nil, relationship_types: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+parent}/assets', ) command.response_representation = Google::Apis::CloudassetV1::ListAssetsResponse::Representation command.response_class = Google::Apis::CloudassetV1::ListAssetsResponse command.params['parent'] = parent unless parent.nil? command.query['assetTypes'] = asset_types unless asset_types.nil? command.query['contentType'] = content_type unless content_type.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['readTime'] = read_time unless read_time.nil? command.query['relationshipTypes'] = relationship_types unless relationship_types.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_feeds(parent, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudassetV1::ListFeedsResponse
Lists all asset feeds in a parent project/folder/organization.
304 305 306 307 308 309 310 311 312 |
# File 'lib/google/apis/cloudasset_v1/service.rb', line 304 def list_feeds(parent, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+parent}/feeds', ) command.response_representation = Google::Apis::CloudassetV1::ListFeedsResponse::Representation command.response_class = Google::Apis::CloudassetV1::ListFeedsResponse command.params['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_saved_queries(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudassetV1::ListSavedQueriesResponse
Lists all saved queries in a parent project/folder/organization.
603 604 605 606 607 608 609 610 611 612 613 614 |
# File 'lib/google/apis/cloudasset_v1/service.rb', line 603 def list_saved_queries(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+parent}/savedQueries', ) command.response_representation = Google::Apis::CloudassetV1::ListSavedQueriesResponse::Representation command.response_class = Google::Apis::CloudassetV1::ListSavedQueriesResponse command.params['parent'] = parent unless parent.nil? command.query['filter'] = filter unless filter.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#patch_feed(name, update_feed_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudassetV1::Feed
Updates an asset feed configuration.
339 340 341 342 343 344 345 346 347 348 349 |
# File 'lib/google/apis/cloudasset_v1/service.rb', line 339 def patch_feed(name, update_feed_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'v1/{+name}', ) command.request_representation = Google::Apis::CloudassetV1::UpdateFeedRequest::Representation command.request_object = update_feed_request_object command.response_representation = Google::Apis::CloudassetV1::Feed::Representation command.response_class = Google::Apis::CloudassetV1::Feed command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#patch_saved_query(name, saved_query_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudassetV1::SavedQuery
Updates a saved query.
642 643 644 645 646 647 648 649 650 651 652 653 |
# File 'lib/google/apis/cloudasset_v1/service.rb', line 642 def patch_saved_query(name, saved_query_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'v1/{+name}', ) command.request_representation = Google::Apis::CloudassetV1::SavedQuery::Representation command.request_object = saved_query_object command.response_representation = Google::Apis::CloudassetV1::SavedQuery::Representation command.response_class = Google::Apis::CloudassetV1::SavedQuery command.params['name'] = name unless name.nil? command.query['updateMask'] = update_mask unless update_mask.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#query_assets(parent, query_assets_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudassetV1::QueryAssetsResponse
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.
1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 |
# File 'lib/google/apis/cloudasset_v1/service.rb', line 1252 def query_assets(parent, query_assets_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+parent}:queryAssets', ) command.request_representation = Google::Apis::CloudassetV1::QueryAssetsRequest::Representation command.request_object = query_assets_request_object command.response_representation = Google::Apis::CloudassetV1::QueryAssetsResponse::Representation command.response_class = Google::Apis::CloudassetV1::QueryAssetsResponse command.params['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#search_all_iam_policies(scope, asset_types: nil, order_by: nil, page_size: nil, page_token: nil, query: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudassetV1::SearchAllIamPoliciesResponse
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.
1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 |
# File 'lib/google/apis/cloudasset_v1/service.rb', line 1357 def search_all_iam_policies(scope, asset_types: nil, order_by: nil, page_size: nil, page_token: nil, query: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+scope}:searchAllIamPolicies', ) command.response_representation = Google::Apis::CloudassetV1::SearchAllIamPoliciesResponse::Representation command.response_class = Google::Apis::CloudassetV1::SearchAllIamPoliciesResponse command.params['scope'] = scope unless scope.nil? command.query['assetTypes'] = asset_types unless asset_types.nil? command.query['orderBy'] = order_by unless order_by.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['query'] = query unless query.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#search_all_resources(scope, asset_types: nil, order_by: nil, page_size: nil, page_token: nil, query: nil, read_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudassetV1::SearchAllResourcesResponse
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.
1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 |
# File 'lib/google/apis/cloudasset_v1/service.rb', line 1507 def search_all_resources(scope, asset_types: nil, order_by: nil, page_size: nil, page_token: nil, query: nil, read_mask: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+scope}:searchAllResources', ) command.response_representation = Google::Apis::CloudassetV1::SearchAllResourcesResponse::Representation command.response_class = Google::Apis::CloudassetV1::SearchAllResourcesResponse command.params['scope'] = scope unless scope.nil? command.query['assetTypes'] = asset_types unless asset_types.nil? command.query['orderBy'] = order_by unless order_by.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['query'] = query unless query.nil? command.query['readMask'] = read_mask unless read_mask.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |