Reference documentation and code samples for the Cloud Asset V1 API class Google::Cloud::Asset::V1::Resource.
A representation of a Google Cloud resource.
Inherits
Object
Extended By
Google::Protobuf::MessageExts::ClassMethods
Includes
Google::Protobuf::MessageExts
Methods
#data
defdata()->::Google::Protobuf::Struct
Returns
(::Google::Protobuf::Struct) — The content of the resource, in which some sensitive fields are removed
and may not be present.
#data=
defdata=(value)->::Google::Protobuf::Struct
Parameter
value (::Google::Protobuf::Struct) — The content of the resource, in which some sensitive fields are removed
and may not be present.
Returns
(::Google::Protobuf::Struct) — The content of the resource, in which some sensitive fields are removed
and may not be present.
#discovery_document_uri
defdiscovery_document_uri()->::String
Returns
(::String) — The URL of the discovery document containing the resource's JSON schema.
Example:
https://www.googleapis.com/discovery/v1/apis/compute/v1/rest
This value is unspecified for resources that do not have an API based on a
discovery document, such as Cloud Bigtable.
#discovery_document_uri=
defdiscovery_document_uri=(value)->::String
Parameter
value (::String) — The URL of the discovery document containing the resource's JSON schema.
Example:
https://www.googleapis.com/discovery/v1/apis/compute/v1/rest
This value is unspecified for resources that do not have an API based on a
discovery document, such as Cloud Bigtable.
Returns
(::String) — The URL of the discovery document containing the resource's JSON schema.
Example:
https://www.googleapis.com/discovery/v1/apis/compute/v1/rest
This value is unspecified for resources that do not have an API based on a
discovery document, such as Cloud Bigtable.
#discovery_name
defdiscovery_name()->::String
Returns
(::String) — The JSON schema name listed in the discovery document. Example:
Project
This value is unspecified for resources that do not have an API based on a
discovery document, such as Cloud Bigtable.
#discovery_name=
defdiscovery_name=(value)->::String
Parameter
value (::String) — The JSON schema name listed in the discovery document. Example:
Project
This value is unspecified for resources that do not have an API based on a
discovery document, such as Cloud Bigtable.
Returns
(::String) — The JSON schema name listed in the discovery document. Example:
Project
This value is unspecified for resources that do not have an API based on a
discovery document, such as Cloud Bigtable.
#location
deflocation()->::String
Returns
(::String) — The location of the resource in Google Cloud, such as its zone and region.
For more information, see https://cloud.google.com/about/locations/.
#location=
deflocation=(value)->::String
Parameter
value (::String) — The location of the resource in Google Cloud, such as its zone and region.
For more information, see https://cloud.google.com/about/locations/.
Returns
(::String) — The location of the resource in Google Cloud, such as its zone and region.
For more information, see https://cloud.google.com/about/locations/.
#parent
defparent()->::String
Returns
(::String) — The full name of the immediate parent of this resource. See
Resource
Names
for more information.
For Google Cloud assets, this value is the parent resource defined in the
IAM policy
hierarchy.
Example:
//cloudresourcemanager.googleapis.com/projects/my_project_123
#parent=
defparent=(value)->::String
Parameter
value (::String) — The full name of the immediate parent of this resource. See
Resource
Names
for more information.
For Google Cloud assets, this value is the parent resource defined in the
IAM policy
hierarchy.
Example:
//cloudresourcemanager.googleapis.com/projects/my_project_123
Returns
(::String) — The full name of the immediate parent of this resource. See
Resource
Names
for more information.
For Google Cloud assets, this value is the parent resource defined in the
IAM policy
hierarchy.
Example:
//cloudresourcemanager.googleapis.com/projects/my_project_123
#resource_url
defresource_url()->::String
Returns
(::String) — The REST URL for accessing the resource. An HTTP GET request using this
URL returns the resource itself. Example:
https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123
This value is unspecified for resources without a REST API.
#resource_url=
defresource_url=(value)->::String
Parameter
value (::String) — The REST URL for accessing the resource. An HTTP GET request using this
URL returns the resource itself. Example:
https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123
This value is unspecified for resources without a REST API.
Returns
(::String) — The REST URL for accessing the resource. An HTTP GET request using this
URL returns the resource itself. Example:
https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123
This value is unspecified for resources without a REST API.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-09 UTC."],[],[],null,["# Cloud Asset V1 API - Class Google::Cloud::Asset::V1::Resource (v1.4.1)\n\nVersion latestkeyboard_arrow_down\n\n- [1.4.1 (latest)](/ruby/docs/reference/google-cloud-asset-v1/latest/Google-Cloud-Asset-V1-Resource)\n- [1.4.0](/ruby/docs/reference/google-cloud-asset-v1/1.4.0/Google-Cloud-Asset-V1-Resource)\n- [1.3.1](/ruby/docs/reference/google-cloud-asset-v1/1.3.1/Google-Cloud-Asset-V1-Resource)\n- [1.2.0](/ruby/docs/reference/google-cloud-asset-v1/1.2.0/Google-Cloud-Asset-V1-Resource)\n- [1.1.0](/ruby/docs/reference/google-cloud-asset-v1/1.1.0/Google-Cloud-Asset-V1-Resource)\n- [1.0.2](/ruby/docs/reference/google-cloud-asset-v1/1.0.2/Google-Cloud-Asset-V1-Resource)\n- [0.32.0](/ruby/docs/reference/google-cloud-asset-v1/0.32.0/Google-Cloud-Asset-V1-Resource)\n- [0.31.0](/ruby/docs/reference/google-cloud-asset-v1/0.31.0/Google-Cloud-Asset-V1-Resource)\n- [0.30.0](/ruby/docs/reference/google-cloud-asset-v1/0.30.0/Google-Cloud-Asset-V1-Resource)\n- [0.29.3](/ruby/docs/reference/google-cloud-asset-v1/0.29.3/Google-Cloud-Asset-V1-Resource)\n- [0.28.1](/ruby/docs/reference/google-cloud-asset-v1/0.28.1/Google-Cloud-Asset-V1-Resource)\n- [0.27.0](/ruby/docs/reference/google-cloud-asset-v1/0.27.0/Google-Cloud-Asset-V1-Resource)\n- [0.26.1](/ruby/docs/reference/google-cloud-asset-v1/0.26.1/Google-Cloud-Asset-V1-Resource)\n- [0.25.0](/ruby/docs/reference/google-cloud-asset-v1/0.25.0/Google-Cloud-Asset-V1-Resource)\n- [0.24.0](/ruby/docs/reference/google-cloud-asset-v1/0.24.0/Google-Cloud-Asset-V1-Resource)\n- [0.23.0](/ruby/docs/reference/google-cloud-asset-v1/0.23.0/Google-Cloud-Asset-V1-Resource)\n- [0.22.0](/ruby/docs/reference/google-cloud-asset-v1/0.22.0/Google-Cloud-Asset-V1-Resource)\n- [0.21.1](/ruby/docs/reference/google-cloud-asset-v1/0.21.1/Google-Cloud-Asset-V1-Resource)\n- [0.20.1](/ruby/docs/reference/google-cloud-asset-v1/0.20.1/Google-Cloud-Asset-V1-Resource)\n- [0.19.0](/ruby/docs/reference/google-cloud-asset-v1/0.19.0/Google-Cloud-Asset-V1-Resource)\n- [0.18.0](/ruby/docs/reference/google-cloud-asset-v1/0.18.0/Google-Cloud-Asset-V1-Resource)\n- [0.17.3](/ruby/docs/reference/google-cloud-asset-v1/0.17.3/Google-Cloud-Asset-V1-Resource) \nReference documentation and code samples for the Cloud Asset V1 API class Google::Cloud::Asset::V1::Resource.\n\nA representation of a Google Cloud resource. \n\nInherits\n--------\n\n- Object \n\nExtended By\n-----------\n\n- Google::Protobuf::MessageExts::ClassMethods \n\nIncludes\n--------\n\n- Google::Protobuf::MessageExts\n\nMethods\n-------\n\n### #data\n\n def data() -\u003e ::Google::Protobuf::Struct\n\n**Returns**\n\n- ([::Google::Protobuf::Struct](./Google-Protobuf-Struct)) --- The content of the resource, in which some sensitive fields are removed and may not be present.\n\n### #data=\n\n def data=(value) -\u003e ::Google::Protobuf::Struct\n\n**Parameter**\n\n- **value** ([::Google::Protobuf::Struct](./Google-Protobuf-Struct)) --- The content of the resource, in which some sensitive fields are removed and may not be present. \n**Returns**\n\n- ([::Google::Protobuf::Struct](./Google-Protobuf-Struct)) --- The content of the resource, in which some sensitive fields are removed and may not be present.\n\n### #discovery_document_uri\n\n def discovery_document_uri() -\u003e ::String\n\n**Returns**\n\n- (::String) --- The URL of the discovery document containing the resource's JSON schema. Example: `https://www.googleapis.com/discovery/v1/apis/compute/v1/rest`\n\n\n This value is unspecified for resources that do not have an API based on a\n discovery document, such as Cloud Bigtable.\n\n### #discovery_document_uri=\n\n def discovery_document_uri=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- The URL of the discovery document containing the resource's JSON schema. Example: `https://www.googleapis.com/discovery/v1/apis/compute/v1/rest`\n\n\n This value is unspecified for resources that do not have an API based on a\ndiscovery document, such as Cloud Bigtable. \n**Returns**\n\n- (::String) --- The URL of the discovery document containing the resource's JSON schema. Example: `https://www.googleapis.com/discovery/v1/apis/compute/v1/rest`\n\n\n This value is unspecified for resources that do not have an API based on a\n discovery document, such as Cloud Bigtable.\n\n### #discovery_name\n\n def discovery_name() -\u003e ::String\n\n**Returns**\n\n- (::String) --- The JSON schema name listed in the discovery document. Example: `Project`\n\n\n This value is unspecified for resources that do not have an API based on a\n discovery document, such as Cloud Bigtable.\n\n### #discovery_name=\n\n def discovery_name=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- The JSON schema name listed in the discovery document. Example: `Project`\n\n\n This value is unspecified for resources that do not have an API based on a\ndiscovery document, such as Cloud Bigtable. \n**Returns**\n\n- (::String) --- The JSON schema name listed in the discovery document. Example: `Project`\n\n\n This value is unspecified for resources that do not have an API based on a\n discovery document, such as Cloud Bigtable.\n\n### #location\n\n def location() -\u003e ::String\n\n**Returns**\n\n- (::String) --- The location of the resource in Google Cloud, such as its zone and region. For more information, see https://cloud.google.com/about/locations/.\n\n### #location=\n\n def location=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- The location of the resource in Google Cloud, such as its zone and region. For more information, see https://cloud.google.com/about/locations/. \n**Returns**\n\n- (::String) --- The location of the resource in Google Cloud, such as its zone and region. For more information, see https://cloud.google.com/about/locations/.\n\n### #parent\n\n def parent() -\u003e ::String\n\n**Returns**\n\n- (::String) --- The full name of the immediate parent of this resource. See [Resource\n Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) for more information.\n\n\n For Google Cloud assets, this value is the parent resource defined in the\n [IAM policy\n hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).\n Example:\n `//cloudresourcemanager.googleapis.com/projects/my_project_123`\n\n### #parent=\n\n def parent=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- The full name of the immediate parent of this resource. See [Resource\n Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) for more information.\n\n\n For Google Cloud assets, this value is the parent resource defined in the\n [IAM policy\n hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).\n Example:\n`//cloudresourcemanager.googleapis.com/projects/my_project_123` \n**Returns**\n\n- (::String) --- The full name of the immediate parent of this resource. See [Resource\n Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) for more information.\n\n\n For Google Cloud assets, this value is the parent resource defined in the\n [IAM policy\n hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).\n Example:\n `//cloudresourcemanager.googleapis.com/projects/my_project_123`\n\n### #resource_url\n\n def resource_url() -\u003e ::String\n\n**Returns**\n\n- (::String) --- The REST URL for accessing the resource. An HTTP `GET` request using this URL returns the resource itself. Example: `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`\n\n\n This value is unspecified for resources without a REST API.\n\n### #resource_url=\n\n def resource_url=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- The REST URL for accessing the resource. An HTTP `GET` request using this URL returns the resource itself. Example: `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`\n\n\nThis value is unspecified for resources without a REST API. \n**Returns**\n\n- (::String) --- The REST URL for accessing the resource. An HTTP `GET` request using this URL returns the resource itself. Example: `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`\n\n\n This value is unspecified for resources without a REST API.\n\n### #version\n\n def version() -\u003e ::String\n\n**Returns**\n\n- (::String) --- The API version. Example: `v1`\n\n### #version=\n\n def version=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- The API version. Example: `v1` \n**Returns**\n\n- (::String) --- The API version. Example: `v1`"]]