Google Cloud Asset V1beta1 Client - Class Resource (1.9.2)

Reference documentation and code samples for the Google Cloud Asset V1beta1 Client class Resource.

Representation of a cloud resource.

Generated from protobuf message google.cloud.asset.v1beta1.Resource

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ version string

The API version. Example: "v1".

↳ discovery_document_uri string

The URL of the discovery document containing the resource's JSON schema. For example: "https://www.googleapis.com/discovery/v1/apis/compute/v1/rest". It will be left unspecified for resources without a discovery-based API, such as Cloud Bigtable.

↳ discovery_name string

The JSON schema name listed in the discovery document. Example: "Project". It will be left unspecified for resources (such as Cloud Bigtable) without a discovery-based API.

↳ resource_url string

The REST URL for accessing the resource. An HTTP GET operation using this URL returns the resource itself. Example: https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123. It will be left unspecified for resources without a REST API.

↳ parent string

The full name of the immediate parent of this resource. See Resource Names for more information. For GCP assets, it is the parent resource defined in the Cloud IAM policy hierarchy. For example: "//cloudresourcemanager.googleapis.com/projects/my_project_123". For third-party assets, it is up to the users to define.

↳ data Google\Protobuf\Struct

The content of the resource, in which some sensitive fields are scrubbed away and may not be present.

getVersion

The API version. Example: "v1".

Generated from protobuf field string version = 1;

Returns
TypeDescription
string

setVersion

The API version. Example: "v1".

Generated from protobuf field string version = 1;

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getDiscoveryDocumentUri

The URL of the discovery document containing the resource's JSON schema.

For example: "https://www.googleapis.com/discovery/v1/apis/compute/v1/rest". It will be left unspecified for resources without a discovery-based API, such as Cloud Bigtable.

Generated from protobuf field string discovery_document_uri = 2;

Returns
TypeDescription
string

setDiscoveryDocumentUri

The URL of the discovery document containing the resource's JSON schema.

For example: "https://www.googleapis.com/discovery/v1/apis/compute/v1/rest". It will be left unspecified for resources without a discovery-based API, such as Cloud Bigtable.

Generated from protobuf field string discovery_document_uri = 2;

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getDiscoveryName

The JSON schema name listed in the discovery document.

Example: "Project". It will be left unspecified for resources (such as Cloud Bigtable) without a discovery-based API.

Generated from protobuf field string discovery_name = 3;

Returns
TypeDescription
string

setDiscoveryName

The JSON schema name listed in the discovery document.

Example: "Project". It will be left unspecified for resources (such as Cloud Bigtable) without a discovery-based API.

Generated from protobuf field string discovery_name = 3;

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getResourceUrl

The REST URL for accessing the resource. An HTTP GET operation using this URL returns the resource itself.

Example: https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123. It will be left unspecified for resources without a REST API.

Generated from protobuf field string resource_url = 4;

Returns
TypeDescription
string

setResourceUrl

The REST URL for accessing the resource. An HTTP GET operation using this URL returns the resource itself.

Example: https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123. It will be left unspecified for resources without a REST API.

Generated from protobuf field string resource_url = 4;

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getParent

The full name of the immediate parent of this resource. See Resource Names for more information.

For GCP assets, it is the parent resource defined in the Cloud IAM policy hierarchy. For example: "//cloudresourcemanager.googleapis.com/projects/my_project_123". For third-party assets, it is up to the users to define.

Generated from protobuf field string parent = 5;

Returns
TypeDescription
string

setParent

The full name of the immediate parent of this resource. See Resource Names for more information.

For GCP assets, it is the parent resource defined in the Cloud IAM policy hierarchy. For example: "//cloudresourcemanager.googleapis.com/projects/my_project_123". For third-party assets, it is up to the users to define.

Generated from protobuf field string parent = 5;

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getData

The content of the resource, in which some sensitive fields are scrubbed away and may not be present.

Generated from protobuf field .google.protobuf.Struct data = 6;

Returns
TypeDescription
Google\Protobuf\Struct

setData

The content of the resource, in which some sensitive fields are scrubbed away and may not be present.

Generated from protobuf field .google.protobuf.Struct data = 6;

Parameter
NameDescription
var Google\Protobuf\Struct
Returns
TypeDescription
$this