public sealed class ResourceContext : IMessage<ResourceContext>, IEquatable<ResourceContext>, IDeepCloneable<ResourceContext>, IBufferMessage, IMessage
Reference documentation and code samples for the Policy Simulator v1 API class 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.
Implements
IMessageResourceContext, IEquatableResourceContext, IDeepCloneableResourceContext, IBufferMessage, IMessageNamespace
Google.Cloud.PolicySimulator.V1Assembly
Google.Cloud.PolicySimulator.V1.dll
Constructors
ResourceContext()
public ResourceContext()
ResourceContext(ResourceContext)
public ResourceContext(ResourceContext other)
Parameter | |
---|---|
Name | Description |
other |
ResourceContext |
Properties
Ancestors
public RepeatedField<string> Ancestors { get; }
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"]
Property Value | |
---|---|
Type | Description |
RepeatedFieldstring |
AssetType
public string AssetType { get; set; }
The asset type of the resource as defined by CAIS.
Example: compute.googleapis.com/Firewall
See Supported asset types for more information.
Property Value | |
---|---|
Type | Description |
string |
Resource
public string Resource { get; set; }
The full name of the resource. Example:
//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1
See Resource names for more information.
Property Value | |
---|---|
Type | Description |
string |