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.
-
#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_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.
710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 |
# File 'lib/google/apis/cloudasset_v1/service.rb', line 710 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.
769 770 771 772 773 774 775 776 777 778 779 |
# File 'lib/google/apis/cloudasset_v1/service.rb', line 769 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.
817 818 819 820 821 822 823 824 825 826 827 |
# File 'lib/google/apis/cloudasset_v1/service.rb', line 817 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.
869 870 871 872 873 874 875 876 877 878 879 880 881 |
# File 'lib/google/apis/cloudasset_v1/service.rb', line 869 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.
968 969 970 971 972 973 974 975 976 977 978 979 980 |
# File 'lib/google/apis/cloudasset_v1/service.rb', line 968 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.
1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 |
# File 'lib/google/apis/cloudasset_v1/service.rb', line 1022 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.
1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 |
# File 'lib/google/apis/cloudasset_v1/service.rb', line 1087 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 |
#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.
413 414 415 416 417 418 419 420 421 422 423 424 |
# File 'lib/google/apis/cloudasset_v1/service.rb', line 413 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_saved_query(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudassetV1::Empty
Deletes a saved query.
449 450 451 452 453 454 455 456 457 |
# File 'lib/google/apis/cloudasset_v1/service.rb', line 449 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.
1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 |
# File 'lib/google/apis/cloudasset_v1/service.rb', line 1134 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.
372 373 374 375 376 377 378 379 380 |
# File 'lib/google/apis/cloudasset_v1/service.rb', line 372 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.
482 483 484 485 486 487 488 489 490 |
# File 'lib/google/apis/cloudasset_v1/service.rb', line 482 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.
530 531 532 533 534 535 536 537 538 539 540 541 |
# File 'lib/google/apis/cloudasset_v1/service.rb', line 530 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.
569 570 571 572 573 574 575 576 577 578 579 580 |
# File 'lib/google/apis/cloudasset_v1/service.rb', line 569 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.
1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 |
# File 'lib/google/apis/cloudasset_v1/service.rb', line 1179 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.
1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 |
# File 'lib/google/apis/cloudasset_v1/service.rb', line 1284 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.
1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 |
# File 'lib/google/apis/cloudasset_v1/service.rb', line 1434 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 |