Policy Simulator V1 API - Class Google::Cloud::PolicySimulator::V1::ResourceContext (v1.4.0)

Reference documentation and code samples for the Policy Simulator V1 API class Google::Cloud::PolicySimulator::V1::ResourceContext.

ResourceContext provides the context we know about a resource. It is similar in concept to google.cloud.asset.v1.Resource, but focuses on the information specifically used by Simulator.

Inherits

  • Object

Extended By

  • Google::Protobuf::MessageExts::ClassMethods

Includes

  • Google::Protobuf::MessageExts

Methods

#ancestors

def ancestors() -> ::Array<::String>
Returns
  • (::Array<::String>) — The ancestry path of the resource 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 resource is a project, folder, or organization, the ancestry path starts from the resource itself.

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

#ancestors=

def ancestors=(value) -> ::Array<::String>
Parameter
  • value (::Array<::String>) — The ancestry path of the resource 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 resource is a project, folder, or organization, the ancestry path starts from the resource itself.

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

Returns
  • (::Array<::String>) — The ancestry path of the resource 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 resource is a project, folder, or organization, the ancestry path starts from the resource itself.

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

#asset_type

def asset_type() -> ::String
Returns
  • (::String) — The asset type of the resource as defined by CAIS.

    Example: compute.googleapis.com/Firewall

    See Supported asset types for more information.

#asset_type=

def asset_type=(value) -> ::String
Parameter
  • value (::String) — The asset type of the resource as defined by CAIS.

    Example: compute.googleapis.com/Firewall

    See Supported asset types for more information.

Returns
  • (::String) — The asset type of the resource as defined by CAIS.

    Example: compute.googleapis.com/Firewall

    See Supported asset types for more information.

#resource

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

    See Resource names for more information.

#resource=

def resource=(value) -> ::String
Parameter
  • value (::String) — The full name of the resource. 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 resource. Example: //compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1

    See Resource names for more information.