Class: Google::Apis::CloudassetV1p4beta1::CloudAssetService
- Inherits:
-
Google::Apis::Core::BaseService
- Object
- Google::Apis::Core::BaseService
- Google::Apis::CloudassetV1p4beta1::CloudAssetService
- Defined in:
- generated/google/apis/cloudasset_v1p4beta1/service.rb
Overview
Cloud Asset API
The cloud asset API manages the history and inventory of cloud resources.
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(parent, analysis_query_access_selector_permissions: nil, analysis_query_access_selector_roles: nil, analysis_query_identity_selector_identity: nil, analysis_query_resource_selector_full_resource_name: nil, options_analyze_service_account_impersonation: nil, options_execution_timeout: nil, options_expand_groups: nil, options_expand_resources: nil, options_expand_roles: nil, options_output_group_edges: nil, options_output_resource_edges: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudassetV1p4beta1::AnalyzeIamPolicyResponse
Analyzes IAM policies to answer which identities have what accesses on which resources.
-
#export_iam_policy_analysis(parent, export_iam_policy_analysis_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudassetV1p4beta1::Operation
Exports the answers of which identities have what accesses on which resources to a Google Cloud Storage destination.
-
#initialize ⇒ CloudAssetService
constructor
A new instance of CloudAssetService.
Constructor Details
#initialize ⇒ CloudAssetService
Returns a new instance of CloudAssetService.
45 46 47 48 |
# File 'generated/google/apis/cloudasset_v1p4beta1/service.rb', line 45 def initialize super('https://cloudasset.googleapis.com/', '') @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.
38 39 40 |
# File 'generated/google/apis/cloudasset_v1p4beta1/service.rb', line 38 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.
43 44 45 |
# File 'generated/google/apis/cloudasset_v1p4beta1/service.rb', line 43 def quota_user @quota_user end |
Instance Method Details
#analyze_iam_policy(parent, analysis_query_access_selector_permissions: nil, analysis_query_access_selector_roles: nil, analysis_query_identity_selector_identity: nil, analysis_query_resource_selector_full_resource_name: nil, options_analyze_service_account_impersonation: nil, options_execution_timeout: nil, options_expand_groups: nil, options_expand_resources: nil, options_expand_roles: nil, options_output_group_edges: nil, options_output_resource_edges: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudassetV1p4beta1::AnalyzeIamPolicyResponse
Analyzes IAM policies to answer which identities have what accesses on which resources.
147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 |
# File 'generated/google/apis/cloudasset_v1p4beta1/service.rb', line 147 def analyze_iam_policy(parent, analysis_query_access_selector_permissions: nil, analysis_query_access_selector_roles: nil, analysis_query_identity_selector_identity: nil, analysis_query_resource_selector_full_resource_name: nil, options_analyze_service_account_impersonation: nil, options_execution_timeout: nil, options_expand_groups: nil, options_expand_resources: nil, options_expand_roles: nil, options_output_group_edges: nil, options_output_resource_edges: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1p4beta1/{+parent}:analyzeIamPolicy', ) command.response_representation = Google::Apis::CloudassetV1p4beta1::AnalyzeIamPolicyResponse::Representation command.response_class = Google::Apis::CloudassetV1p4beta1::AnalyzeIamPolicyResponse command.params['parent'] = parent unless parent.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.identitySelector.identity'] = analysis_query_identity_selector_identity unless analysis_query_identity_selector_identity.nil? command.query['analysisQuery.resourceSelector.fullResourceName'] = analysis_query_resource_selector_full_resource_name unless analysis_query_resource_selector_full_resource_name.nil? command.query['options.analyzeServiceAccountImpersonation'] = unless .nil? command.query['options.executionTimeout'] = unless .nil? command.query['options.expandGroups'] = unless .nil? command.query['options.expandResources'] = unless .nil? command.query['options.expandRoles'] = unless .nil? command.query['options.outputGroupEdges'] = unless .nil? command.query['options.outputResourceEdges'] = unless .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_iam_policy_analysis(parent, export_iam_policy_analysis_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CloudassetV1p4beta1::Operation
Exports the answers of which identities have what accesses on which resources to a Google Cloud Storage destination. The output format is the JSON format that represents a AnalyzeIamPolicyResponse in the JSON format. This method implements the google.longrunning.Operation, 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. The metadata contains the request to help callers to map responses to requests.
203 204 205 206 207 208 209 210 211 212 213 |
# File 'generated/google/apis/cloudasset_v1p4beta1/service.rb', line 203 def export_iam_policy_analysis(parent, export_iam_policy_analysis_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1p4beta1/{+parent}:exportIamPolicyAnalysis', ) command.request_representation = Google::Apis::CloudassetV1p4beta1::ExportIamPolicyAnalysisRequest::Representation command.request_object = export_iam_policy_analysis_request_object command.response_representation = Google::Apis::CloudassetV1p4beta1::Operation::Representation command.response_class = Google::Apis::CloudassetV1p4beta1::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 |