Method: folders.exportAssets

Exports assets with time and resource types to a given Cloud Storage location. The output format is newline-delimited JSON. This API implements the google.longrunning.Operation API allowing you to keep track of the export.

HTTP request

POST https://cloudasset.googleapis.com/v1beta1/{parent=folders/*}:exportAssets

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
parent

string

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"), a project number (such as "projects/12345"), or a folder number (such as "folders/123").

Authorization requires one or more of the following Google IAM permissions on the specified resource parent:

  • cloudasset.assets.exportResource
  • cloudasset.assets.exportIamPolicy

Request body

The request body contains data with the following structure:

JSON representation
{
  "readTime": string,
  "assetTypes": [
    string
  ],
  "contentType": enum(ContentType),
  "outputConfig": {
    object(OutputConfig)
  }
}
Fields
readTime

string (Timestamp format)

timestamp to take an asset snapshot. This can only be set to a timestamp between 2018-10-02 UTC (inclusive) and the current time. If not specified, the current time will be used. Due to delays in resource data collection and indexing, there is a volatile window during which running the same query may get different results.

A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds. Example: "2014-10-02T15:01:23.045123456Z".

assetTypes[]

string

A list of asset types of which to take a snapshot for. For example: "google.compute.Disk". If specified, only matching assets will be returned. See Introduction to Cloud Asset Inventory for all supported asset types.

contentType

enum(ContentType)

Asset content type. If not specified, no content but the asset name will be returned.

outputConfig

object(OutputConfig)

Required. Output configuration indicating where the results will be output to. All results will be in newline delimited JSON format.

Response body

If successful, the response body contains an instance of Operation.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

Try it!

หน้านี้มีประโยชน์ไหม โปรดแสดงความคิดเห็น