public sealed class Asset : IMessage<Asset>, IEquatable<Asset>, IDeepCloneable<Asset>, IBufferMessage, IMessage
Reference documentation and code samples for the Google Cloud Asset Inventory v1 API class Asset.
An asset in Google Cloud. An asset can be any resource in the Google Cloud
resource
hierarchy,
a resource outside the Google Cloud resource hierarchy (such as Google
Kubernetes Engine clusters and objects), or a policy (e.g. IAM policy),
or a relationship (e.g. an INSTANCE_TO_INSTANCEGROUP relationship).
See Supported asset
types
for more information.
The ancestry path of an asset in Google Cloud resource
hierarchy,
represented as a list of relative resource names. An ancestry path starts
with the closest ancestor in the hierarchy and ends at root. If the asset
is a project, folder, or organization, the ancestry path starts from the
asset itself.
A representation of the IAM policy set on a Google Cloud resource.
There can be a maximum of one IAM policy set on any given resource.
In addition, IAM policies inherit their granted access scope from any
policies set on parent resources in the resource hierarchy. Therefore, the
effectively policy is the union of both the policy set on this resource
and each policy set on all of the resource's ancestry resource levels in
the hierarchy. See
this topic
for more information.
DEPRECATED. This field only presents for the purpose of
backward-compatibility. The server will never generate responses with this
field.
The related assets of the asset of one relationship type. One asset
only represents one type of relationship.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eAsset\u003c/code\u003e class represents a resource in the Google Cloud environment, which can include any resource within the hierarchy, resources outside of it like Kubernetes clusters, or policies and relationships.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version of \u003ccode\u003eAsset\u003c/code\u003e is 3.12.0, with older versions also listed, ranging down to 2.7.0, each with their own documentation.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eAsset\u003c/code\u003e implements several interfaces such as \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, and has properties like \u003ccode\u003eIamPolicy\u003c/code\u003e, \u003ccode\u003eOrgPolicy\u003c/code\u003e, and \u003ccode\u003eResource\u003c/code\u003e to manage asset details.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eAsset\u003c/code\u003e class includes properties to manage and retrieve information such as \u003ccode\u003eAssetType\u003c/code\u003e, \u003ccode\u003eName\u003c/code\u003e, \u003ccode\u003eAncestors\u003c/code\u003e, \u003ccode\u003eOsInventory\u003c/code\u003e, and policies, as well as maintain a timestamp for updates with \u003ccode\u003eUpdateTime\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eAn asset's ancestry can be traced through the \u003ccode\u003eAncestors\u003c/code\u003e property, which provides a list of relative resource names from the closest ancestor to the root of the hierarchy.\u003c/p\u003e\n"]]],[],null,["# Google Cloud Asset Inventory v1 API - Class Asset (3.13.0)\n\nVersion latestkeyboard_arrow_down\n\n- [3.13.0 (latest)](/dotnet/docs/reference/Google.Cloud.Asset.V1/latest/Google.Cloud.Asset.V1.Asset)\n- [3.12.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/3.12.0/Google.Cloud.Asset.V1.Asset)\n- [3.11.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/3.11.0/Google.Cloud.Asset.V1.Asset)\n- [3.10.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/3.10.0/Google.Cloud.Asset.V1.Asset)\n- [3.9.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/3.9.0/Google.Cloud.Asset.V1.Asset)\n- [3.8.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/3.8.0/Google.Cloud.Asset.V1.Asset)\n- [3.7.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/3.7.0/Google.Cloud.Asset.V1.Asset)\n- [3.6.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/3.6.0/Google.Cloud.Asset.V1.Asset)\n- [3.5.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/3.5.0/Google.Cloud.Asset.V1.Asset)\n- [3.4.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/3.4.0/Google.Cloud.Asset.V1.Asset)\n- [3.3.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/3.3.0/Google.Cloud.Asset.V1.Asset)\n- [3.2.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/3.2.0/Google.Cloud.Asset.V1.Asset)\n- [3.1.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/3.1.0/Google.Cloud.Asset.V1.Asset)\n- [3.0.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/3.0.0/Google.Cloud.Asset.V1.Asset)\n- [2.11.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/2.11.0/Google.Cloud.Asset.V1.Asset)\n- [2.10.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/2.10.0/Google.Cloud.Asset.V1.Asset)\n- [2.9.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/2.9.0/Google.Cloud.Asset.V1.Asset)\n- [2.8.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/2.8.0/Google.Cloud.Asset.V1.Asset)\n- [2.7.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/2.7.0/Google.Cloud.Asset.V1.Asset) \n\n public sealed class Asset : IMessage\u003cAsset\u003e, IEquatable\u003cAsset\u003e, IDeepCloneable\u003cAsset\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Google Cloud Asset Inventory v1 API class Asset.\n\nAn asset in Google Cloud. An asset can be any resource in the Google Cloud\n[resource\nhierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),\na resource outside the Google Cloud resource hierarchy (such as Google\nKubernetes Engine clusters and objects), or a policy (e.g. IAM policy),\nor a relationship (e.g. an INSTANCE_TO_INSTANCEGROUP relationship).\nSee [Supported asset\ntypes](https://cloud.google.com/asset-inventory/docs/supported-asset-types)\nfor more information. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e Asset \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[Asset](/dotnet/docs/reference/Google.Cloud.Asset.V1/latest/Google.Cloud.Asset.V1.Asset), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[Asset](/dotnet/docs/reference/Google.Cloud.Asset.V1/latest/Google.Cloud.Asset.V1.Asset), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[Asset](/dotnet/docs/reference/Google.Cloud.Asset.V1/latest/Google.Cloud.Asset.V1.Asset), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.Asset.V1](/dotnet/docs/reference/Google.Cloud.Asset.V1/latest/Google.Cloud.Asset.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.Asset.V1.dll\n\nConstructors\n------------\n\n### Asset()\n\n public Asset()\n\n### Asset(Asset)\n\n public Asset(Asset other)\n\nProperties\n----------\n\n### AccessContextPolicyCase\n\n public Asset.AccessContextPolicyOneofCase AccessContextPolicyCase { get; }\n\n### AccessLevel\n\n public AccessLevel AccessLevel { get; set; }\n\nAlso refer to the [access level user\nguide](https://cloud.google.com/access-context-manager/docs/overview#access-levels).\n\n### AccessPolicy\n\n public AccessPolicy AccessPolicy { get; set; }\n\nAlso refer to the [access policy user\nguide](https://cloud.google.com/access-context-manager/docs/overview#access-policies).\n\n### Ancestors\n\n public RepeatedField\u003cstring\u003e Ancestors { get; }\n\nThe ancestry path of an asset in Google Cloud [resource\nhierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),\nrepresented as a list of relative resource names. An ancestry path starts\nwith the closest ancestor in the hierarchy and ends at root. If the asset\nis a project, folder, or organization, the ancestry path starts from the\nasset itself.\n\nExample: `[\"projects/123456789\", \"folders/5432\", \"organizations/1234\"]`\n\n### AssetType\n\n public string AssetType { get; set; }\n\nThe type of the asset. Example: `compute.googleapis.com/Disk`\n\nSee [Supported asset\ntypes](https://cloud.google.com/asset-inventory/docs/supported-asset-types)\nfor more information.\n\n### IamPolicy\n\n public Policy IamPolicy { get; set; }\n\nA representation of the IAM policy set on a Google Cloud resource.\nThere can be a maximum of one IAM policy set on any given resource.\nIn addition, IAM policies inherit their granted access scope from any\npolicies set on parent resources in the resource hierarchy. Therefore, the\neffectively policy is the union of both the policy set on this resource\nand each policy set on all of the resource's ancestry resource levels in\nthe hierarchy. See\n[this topic](https://cloud.google.com/iam/help/allow-policies/inheritance)\nfor more information.\n\n### Name\n\n public string Name { get; set; }\n\nThe full name of the asset. Example:\n`//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`\n\nSee [Resource\nnames](https://cloud.google.com/apis/design/resource_names#full_resource_name)\nfor more information.\n\n### OrgPolicy\n\n public RepeatedField\u003cPolicy\u003e OrgPolicy { get; }\n\nA representation of an [organization\npolicy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).\nThere can be more than one organization policy with different constraints\nset on a given resource.\n\n### OsInventory\n\n public Inventory OsInventory { get; set; }\n\nA representation of runtime OS Inventory information. See [this\ntopic](https://cloud.google.com/compute/docs/instances/os-inventory-management)\nfor more information.\n\n### RelatedAsset\n\n public RelatedAsset RelatedAsset { get; set; }\n\nOne related asset of the current asset.\n\n### RelatedAssets\n\n [Obsolete]\n public RelatedAssets RelatedAssets { get; set; }\n\nDEPRECATED. This field only presents for the purpose of\nbackward-compatibility. The server will never generate responses with this\nfield.\nThe related assets of the asset of one relationship type. One asset\nonly represents one type of relationship.\n\n### Resource\n\n public Resource Resource { get; set; }\n\nA representation of the resource.\n\n### ResourceName\n\n public IResourceName ResourceName { get; set; }\n\n[IResourceName](https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.IResourceName.html)-typed view over the [Name](/dotnet/docs/reference/Google.Cloud.Asset.V1/latest/Google.Cloud.Asset.V1.Asset#Google_Cloud_Asset_V1_Asset_Name) resource name property.\n\n### ServicePerimeter\n\n public ServicePerimeter ServicePerimeter { get; set; }\n\nAlso refer to the [service perimeter user\nguide](https://cloud.google.com/vpc-service-controls/docs/overview).\n\n### UpdateTime\n\n public Timestamp UpdateTime { get; set; }\n\nThe last update timestamp of an asset. update_time is updated when\ncreate/update/delete operation is performed."]]