google_api_cloud_asset v0.13.0 GoogleApi.CloudAsset.V1.Api.V1 View Source
API calls for all endpoints tagged V1
.
Link to this section Summary
Functions
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.
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 proto 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.
Searches all the IAM policies within the given accessible scope (e.g., a
project, a folder or an organization). Callers should have
cloud.assets.SearchAllIamPolicies
permission upon the requested scope,
otherwise the request will be rejected.
Searches all the resources within the given accessible scope (e.g., a
project, a folder or an organization). Callers should have
cloud.assets.SearchAllResources
permission upon the requested scope,
otherwise the request will be rejected.
Link to this section Functions
cloudasset_batch_get_assets_history(connection, v1_id, v1_id1, optional_params \\ [], opts \\ [])
View SourceSpecs
cloudasset_batch_get_assets_history( Tesla.Env.client(), String.t(), String.t(), keyword(), keyword() ) :: {:ok, GoogleApi.CloudAsset.V1.Model.BatchGetAssetsHistoryResponse.t()} | {:ok, Tesla.Env.t()} | {:error, any()}
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.
Parameters
connection
(type:GoogleApi.CloudAsset.V1.Connection.t
) - Connection to serverv1_id
(type:String.t
) - Part ofparent
. Required. The relative name of the root asset. It can only be an organization number (such as "organizations/123"), a project ID (such as "projects/my-project-id")", or a project number (such as "projects/12345").v1_id1
(type:String.t
) - Part ofparent
. See documentation ofv1Id
.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").:assetNames
(type:list(String.t)
) - A list of the full names of the assets. See: https://cloud.google.com/asset-inventory/docs/resource-name-format Example://compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1
. The request becomes a no-op if the asset name list is empty, and the max size of the asset name list is 100 in one request.:contentType
(type:String.t
) - Optional. The content type.:"readTimeWindow.endTime"
(type:DateTime.t
) - End time of the time window (inclusive). If not specified, the current timestamp is used instead.:"readTimeWindow.startTime"
(type:DateTime.t
) - Start time of the time window (exclusive).
opts
(type:keyword()
) - Call options
Returns
-
{:ok, %GoogleApi.CloudAsset.V1.Model.BatchGetAssetsHistoryResponse{}}
on success -
{:error, info}
on failure
cloudasset_export_assets(connection, v1_id, v1_id1, optional_params \\ [], opts \\ [])
View SourceSpecs
cloudasset_export_assets( Tesla.Env.client(), String.t(), String.t(), keyword(), keyword() ) :: {:ok, GoogleApi.CloudAsset.V1.Model.Operation.t()} | {:ok, Tesla.Env.t()} | {:error, any()}
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 proto 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.
Parameters
-
connection
(type:GoogleApi.CloudAsset.V1.Connection.t
) - Connection to server -
v1_id
(type:String.t
) - Part ofparent
. Required. The relative name of the root asset. This can only be an organization number (such as "organizations/123"), a project ID (such as "projects/my-project-id"), or a project number (such as "projects/12345"), or a folder number (such as "folders/123"). -
v1_id1
(type:String.t
) - Part ofparent
. See documentation ofv1Id
. -
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"). -
:body
(type:GoogleApi.CloudAsset.V1.Model.ExportAssetsRequest.t
) -
-
-
opts
(type:keyword()
) - Call options
Returns
-
{:ok, %GoogleApi.CloudAsset.V1.Model.Operation{}}
on success -
{:error, info}
on failure
cloudasset_search_all_iam_policies(connection, v1_id, v1_id1, optional_params \\ [], opts \\ [])
View SourceSpecs
cloudasset_search_all_iam_policies( Tesla.Env.client(), String.t(), String.t(), keyword(), keyword() ) :: {:ok, GoogleApi.CloudAsset.V1.Model.SearchAllIamPoliciesResponse.t()} | {:ok, Tesla.Env.t()} | {:error, any()}
Searches all the IAM policies within the given accessible scope (e.g., a
project, a folder or an organization). Callers should have
cloud.assets.SearchAllIamPolicies
permission upon the requested scope,
otherwise the request will be rejected.
Parameters
connection
(type:GoogleApi.CloudAsset.V1.Connection.t
) - Connection to serverv1_id
(type:String.t
) - Part ofscope
. Required. A scope can be a project, a folder or an organization. The search is limited to the IAM policies within thescope
.The allowed values are:
- projects/{PROJECT_ID}
- projects/{PROJECT_NUMBER}
- folders/{FOLDER_NUMBER}
- organizations/{ORGANIZATION_NUMBER}
v1_id1
(type:String.t
) - Part ofscope
. See documentation ofv1Id
.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").:pageSize
(type:integer()
) - Optional. The page size for search result pagination. Page size is capped at 500 even if a larger value is given. If set to zero, server will pick an appropriate default. Returned results may be fewer than requested. When this happens, there could be more results as long asnext_page_token
is returned.:pageToken
(type:String.t
) - Optional. If present, retrieve the next batch of results from the preceding call to this method.page_token
must be the value ofnext_page_token
from the previous response. The values of all other method parameters must be identical to those in the previous call.:query
(type:String.t
) - Optional. The query statement. An empty query can be specified to search all the IAM policies within the givenscope
.Examples:
policy : "amy@gmail.com"
to find Cloud IAM policy bindings that specify user "amy@gmail.com".policy : "roles/compute.admin"
to find Cloud IAM policy bindings that specify the Compute Admin role.policy.role.permissions : "storage.buckets.update"
to find Cloud IAM policy bindings that specify a role containing "storage.buckets.update" permission.resource : "organizations/123"
to find Cloud IAM policy bindings that are set on "organizations/123".(resource : ("organizations/123" OR "folders/1234") AND policy : "amy")
to find Cloud IAM policy bindings that are set on "organizations/123" or "folders/1234", and also specify user "amy". See how to construct a query for more details.
opts
(type:keyword()
) - Call options
Returns
-
{:ok, %GoogleApi.CloudAsset.V1.Model.SearchAllIamPoliciesResponse{}}
on success -
{:error, info}
on failure
cloudasset_search_all_resources(connection, v1_id, v1_id1, optional_params \\ [], opts \\ [])
View SourceSpecs
cloudasset_search_all_resources( Tesla.Env.client(), String.t(), String.t(), keyword(), keyword() ) :: {:ok, GoogleApi.CloudAsset.V1.Model.SearchAllResourcesResponse.t()} | {:ok, Tesla.Env.t()} | {:error, any()}
Searches all the resources within the given accessible scope (e.g., a
project, a folder or an organization). Callers should have
cloud.assets.SearchAllResources
permission upon the requested scope,
otherwise the request will be rejected.
Parameters
connection
(type:GoogleApi.CloudAsset.V1.Connection.t
) - Connection to serverv1_id
(type:String.t
) - Part ofscope
. Required. A scope can be a project, a folder or an organization. The search is limited to the resources within thescope
.The allowed values are:
- projects/{PROJECT_ID}
- projects/{PROJECT_NUMBER}
- folders/{FOLDER_NUMBER}
- organizations/{ORGANIZATION_NUMBER}
v1_id1
(type:String.t
) - Part ofscope
. See documentation ofv1Id
.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").:assetTypes
(type:list(String.t)
) - Optional. A list of asset types that this request searches for. If empty, it will search all the searchable asset types.:orderBy
(type:String.t
) - Optional. A comma separated list of fields specifying the sorting order of the results. The default order is ascending. Add " DESC" after the field name to indicate descending order. Redundant space characters are ignored. Example: "location DESC, name". Only string fields in the response are sortable, includingname
,displayName
,description
,location
. All the other fields such as repeated fields (e.g.,networkTags
), map fields (e.g.,labels
) and struct fields (e.g.,additionalAttributes
) are not supported.:pageSize
(type:integer()
) - Optional. The page size for search result pagination. Page size is capped at 500 even if a larger value is given. If set to zero, server will pick an appropriate default. Returned results may be fewer than requested. When this happens, there could be more results as long asnext_page_token
is returned.:pageToken
(type:String.t
) - Optional. If present, then retrieve the next batch of results from the preceding call to this method.page_token
must be the value ofnext_page_token
from the previous response. The values of all other method parameters, must be identical to those in the previous call.:query
(type:String.t
) - Optional. The query statement. An empty query can be specified to search all the resources of certainasset_types
within the givenscope
.Examples:
name : "Important"
to find Cloud resources whose name contains "Important" as a word.displayName : "Impor*"
to find Cloud resources whose display name contains "Impor" as a word prefix.description : "*por*"
to find Cloud resources whose description contains "por" as a substring.location : "us-west*"
to find Cloud resources whose location is prefixed with "us-west".labels : "prod"
to find Cloud resources whose labels contain "prod" as a key or value.labels.env : "prod"
to find Cloud resources which have a label "env" and its value is "prod".labels.env : *
to find Cloud resources which have a label "env"."Important"
to find Cloud resources which contain "Important" as a word in any of the searchable fields."Impor*"
to find Cloud resources which contain "Impor" as a word prefix in any of the searchable fields."*por*"
to find Cloud resources which contain "por" as a substring in any of the searchable fields.("Important" AND location : ("us-west1" OR "global"))
to find Cloud resources which contain "Important" as a word in any of the searchable fields and are also located in the "us-west1" region or the "global" location. See how to construct a query for more details.
opts
(type:keyword()
) - Call options
Returns
-
{:ok, %GoogleApi.CloudAsset.V1.Model.SearchAllResourcesResponse{}}
on success -
{:error, info}
on failure