Cloud Asset V1 API - Class Google::Cloud::Asset::V1::Asset (v0.23.0)

Reference documentation and code samples for the Cloud Asset V1 API class Google::Cloud::Asset::V1::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.

Inherits

  • Object

Extended By

  • Google::Protobuf::MessageExts::ClassMethods

Includes

  • Google::Protobuf::MessageExts

Methods

#access_level

def access_level() -> ::Google::Identity::AccessContextManager::V1::AccessLevel

#access_level=

def access_level=(value) -> ::Google::Identity::AccessContextManager::V1::AccessLevel

#access_policy

def access_policy() -> ::Google::Identity::AccessContextManager::V1::AccessPolicy

#access_policy=

def access_policy=(value) -> ::Google::Identity::AccessContextManager::V1::AccessPolicy

#ancestors

def ancestors() -> ::Array<::String>
Returns
  • (::Array<::String>) — 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.

    Example: ["projects/123456789", "folders/5432", "organizations/1234"]

#ancestors=

def ancestors=(value) -> ::Array<::String>
Parameter
  • value (::Array<::String>) — 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.

    Example: ["projects/123456789", "folders/5432", "organizations/1234"]

Returns
  • (::Array<::String>) — 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.

    Example: ["projects/123456789", "folders/5432", "organizations/1234"]

#asset_type

def asset_type() -> ::String
Returns
  • (::String) — The type of the asset. Example: compute.googleapis.com/Disk

    See Supported asset types for more information.

#asset_type=

def asset_type=(value) -> ::String
Parameter
  • value (::String) — The type of the asset. Example: compute.googleapis.com/Disk

    See Supported asset types for more information.

Returns
  • (::String) — The type of the asset. Example: compute.googleapis.com/Disk

    See Supported asset types for more information.

#iam_policy

def iam_policy() -> ::Google::Iam::V1::Policy
Returns
  • (::Google::Iam::V1::Policy) — 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.

#iam_policy=

def iam_policy=(value) -> ::Google::Iam::V1::Policy
Parameter
  • value (::Google::Iam::V1::Policy) — 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.
Returns
  • (::Google::Iam::V1::Policy) — 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.

#name

def name() -> ::String
Returns
  • (::String) — The full name of the asset. Example: //compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1

    See Resource names for more information.

#name=

def name=(value) -> ::String
Parameter
  • value (::String) — The full name of the asset. Example: //compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1

    See Resource names for more information.

Returns
  • (::String) — The full name of the asset. Example: //compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1

    See Resource names for more information.

#org_policy

def org_policy() -> ::Array<::Google::Cloud::OrgPolicy::V1::Policy>
Returns

#org_policy=

def org_policy=(value) -> ::Array<::Google::Cloud::OrgPolicy::V1::Policy>
Parameter
Returns

#os_inventory

def os_inventory() -> ::Google::Cloud::OsConfig::V1::Inventory
Returns

#os_inventory=

def os_inventory=(value) -> ::Google::Cloud::OsConfig::V1::Inventory
Parameter
Returns
def related_asset() -> ::Google::Cloud::Asset::V1::RelatedAsset
Returns
def related_asset=(value) -> ::Google::Cloud::Asset::V1::RelatedAsset
Parameter
Returns
def related_assets() -> ::Google::Cloud::Asset::V1::RelatedAssets
Returns
  • (::Google::Cloud::Asset::V1::RelatedAssets) — 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.
def related_assets=(value) -> ::Google::Cloud::Asset::V1::RelatedAssets
Parameter
  • value (::Google::Cloud::Asset::V1::RelatedAssets) — 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.
Returns
  • (::Google::Cloud::Asset::V1::RelatedAssets) — 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.

#resource

def resource() -> ::Google::Cloud::Asset::V1::Resource
Returns

#resource=

def resource=(value) -> ::Google::Cloud::Asset::V1::Resource
Parameter
Returns

#service_perimeter

def service_perimeter() -> ::Google::Identity::AccessContextManager::V1::ServicePerimeter

#service_perimeter=

def service_perimeter=(value) -> ::Google::Identity::AccessContextManager::V1::ServicePerimeter

#update_time

def update_time() -> ::Google::Protobuf::Timestamp
Returns
  • (::Google::Protobuf::Timestamp) — The last update timestamp of an asset. update_time is updated when create/update/delete operation is performed.

#update_time=

def update_time=(value) -> ::Google::Protobuf::Timestamp
Parameter
  • value (::Google::Protobuf::Timestamp) — The last update timestamp of an asset. update_time is updated when create/update/delete operation is performed.
Returns
  • (::Google::Protobuf::Timestamp) — The last update timestamp of an asset. update_time is updated when create/update/delete operation is performed.