GoogleApi.CloudAsset.V1.Api.V1.cloudasset_analyze_iam_policy

You're seeing just the function cloudasset_analyze_iam_policy, go back to GoogleApi.CloudAsset.V1.Api.V1 module for more information.
Link to this function

cloudasset_analyze_iam_policy(connection, v1_id, v1_id1, optional_params \\ [], opts \\ [])

View Source

Specs

cloudasset_analyze_iam_policy(
  Tesla.Env.client(),
  String.t(),
  String.t(),
  keyword(),
  keyword()
) ::
  {:ok, GoogleApi.CloudAsset.V1.Model.AnalyzeIamPolicyResponse.t()}
  | {:ok, Tesla.Env.t()}
  | {:ok, list()}
  | {:error, any()}

Analyzes IAM policies to answer which identities have what accesses on which resources.

Parameters

  • connection (type: GoogleApi.CloudAsset.V1.Connection.t) - Connection to server
  • v1_id (type: String.t) - Part of analysisQuery.scope. Required. The relative name of the root asset. Only resources and IAM policies within the scope will be analyzed. This can only be an organization number (such as "organizations/123"), a folder number (such as "folders/123"), a project ID (such as "projects/my-project-id"), or a project number (such as "projects/12345"). To know how to get organization id, visit here . To know how to get folder or project id, visit here .
  • v1_id1 (type: String.t) - Part of analysisQuery.scope. See documentation of v1Id.
  • optional_params (type: keyword()) - Optional parameters
    • :"$.xgafv" (type: String.t) - V1 error format.
    • :access_token (type: String.t) - OAuth access token.
    • :alt (type: String.t) - Data format for response.
    • :callback (type: String.t) - JSONP
    • :fields (type: String.t) - Selector specifying which fields to include in a partial response.
    • :key (type: String.t) - 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.
    • :oauth_token (type: String.t) - OAuth 2.0 token for the current user.
    • :prettyPrint (type: boolean()) - Returns response with indentations and line breaks.
    • :quotaUser (type: String.t) - 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.
    • :uploadType (type: String.t) - Legacy upload protocol for media (e.g. "media", "multipart").
    • :upload_protocol (type: String.t) - Upload protocol for media (e.g. "raw", "multipart").
    • :"analysisQuery.accessSelector.permissions" (type: list(String.t)) - Optional. The permissions to appear in result.
    • :"analysisQuery.accessSelector.roles" (type: list(String.t)) - Optional. The roles to appear in result.
    • :"analysisQuery.conditionContext.accessTime" (type: DateTime.t) - The hypothetical access timestamp to evaluate IAM conditions. Note that this value must not be earlier than the current time; otherwise, an INVALID_ARGUMENT error will be returned.
    • :"analysisQuery.identitySelector.identity" (type: String.t) - Required. The identity appear in the form of members in IAM policy binding. The examples of supported forms are: "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com". Notice that wildcard characters (such as * and ?) are not supported. You must give a specific identity.
    • :"analysisQuery.options.analyzeServiceAccountImpersonation" (type: boolean()) - Optional. If true, the response will include access analysis from identities to resources via service account impersonation. This is a very expensive operation, because many derived queries will be executed. We highly recommend you use AssetService.AnalyzeIamPolicyLongrunning rpc instead. For example, if the request analyzes for which resources user A has permission P, and there's an IAM policy states user A has iam.serviceAccounts.getAccessToken permission to a service account SA, and there's another IAM policy states service account SA has permission P to a GCP folder F, then user A potentially has access to the GCP folder F. And those advanced analysis results will be included in AnalyzeIamPolicyResponse.service_account_impersonation_analysis. Another example, if the request analyzes for who has permission P to a GCP folder F, and there's an IAM policy states user A has iam.serviceAccounts.actAs permission to a service account SA, and there's another IAM policy states service account SA has permission P to the GCP folder F, then user A potentially has access to the GCP folder F. And those advanced analysis results will be included in AnalyzeIamPolicyResponse.service_account_impersonation_analysis. Default is false.
    • :"analysisQuery.options.expandGroups" (type: boolean()) - Optional. If true, the identities section of the result will expand any Google groups appearing in an IAM policy binding. If IamPolicyAnalysisQuery.identity_selector is specified, the identity in the result will be determined by the selector, and this flag is not allowed to set. Default is false.
    • :"analysisQuery.options.expandResources" (type: boolean()) - Optional. If true and IamPolicyAnalysisQuery.resource_selector is not specified, the resource section of the result will expand any resource attached to an IAM policy to include resources lower in the resource hierarchy. For example, if the request analyzes for which resources user A has permission P, and the results include an IAM policy with P on a GCP folder, the results will also include resources in that folder with permission P. If true and IamPolicyAnalysisQuery.resource_selector is specified, the resource section of the result will expand the specified resource to include resources lower in the resource hierarchy. Only project or lower resources are supported. Folder and organization resource cannot be used together with this option. For example, if the request analyzes for which users have permission P on a GCP project with this option enabled, the results will include all users who have permission P on that project or any lower resource. Default is false.
    • :"analysisQuery.options.expandRoles" (type: boolean()) - Optional. If true, the access section of result will expand any roles appearing in IAM policy bindings to include their permissions. If IamPolicyAnalysisQuery.access_selector is specified, the access section of the result will be determined by the selector, and this flag is not allowed to set. Default is false.
    • :"analysisQuery.options.outputGroupEdges" (type: boolean()) - Optional. If true, the result will output group identity edges, starting from the binding's group members, to any expanded identities. Default is false.
    • :"analysisQuery.options.outputResourceEdges" (type: boolean()) - Optional. If true, the result will output resource edges, starting from the policy attached resource, to any expanded resources. Default is false.
    • :"analysisQuery.resourceSelector.fullResourceName" (type: String.t) - Required. The [full resource name] (https://cloud.google.com/asset-inventory/docs/resource-name-format) of a resource of supported resource types.
    • :executionTimeout (type: String.t) - Optional. Amount of time executable has to complete. See JSON representation of Duration. If this field is set with a value less than the RPC deadline, and the execution of your query hasn't finished in the specified execution timeout, you will get a response with partial result. Otherwise, your query's execution will continue until the RPC deadline. If it's not finished until then, you will get a DEADLINE_EXCEEDED error. Default is empty.
  • opts (type: keyword()) - Call options

Returns

  • {:ok, %GoogleApi.CloudAsset.V1.Model.AnalyzeIamPolicyResponse{}} on success
  • {:error, info} on failure