Share via


PolicyRuleV1 Class

Definition

Represents a Kubernetes PolicyRule resource in API version v1.

[YamlDotNet.Serialization.YamlSerializable]
public sealed class PolicyRuleV1
[<YamlDotNet.Serialization.YamlSerializable>]
type PolicyRuleV1 = class
Public NotInheritable Class PolicyRuleV1
Inheritance
PolicyRuleV1
Attributes
YamlDotNet.Serialization.YamlSerializableAttribute

Remarks

A PolicyRule defines a set of permissions within the Role-Based Access Control (RBAC) system. It specifies allowed actions on the Kubernetes API and can target specific resources, resource names, or non-resource URLs. The rule is composed of different lists that determine the API groups, resources, resource names, verbs, and non-resource URLs it applies to.

Constructors

PolicyRuleV1()

Properties

ApiGroups

Gets the list of API groups that the policy rule applies to. Each entry in the list specifies the name of an API group to which the rule grants access. An empty list or null indicates that the rule applies to all API groups within the scope of the rule.

NonResourceUrLs

Gets the list of URLs that do not correspond to standard Kubernetes resources. These URLs are typically used to define permissions or access control for specific non-resource requests within the cluster, such as custom API paths or administrative endpoints.

ResourceNames

Gets the list of resource names that the policy rule applies to. Resource names are specific objects within a resource type, such as a specific ConfigMap or Pod. This property allows for fine-grained control of access to named resources.

Resources

Gets the list of resource names that the policy applies to in a Kubernetes cluster. These resources generally refer to resource types such as pods, services, deployments, etc., and must align with the resource types defined in the Kubernetes API.

Verbs

Gets the list of actions or operations that are allowed or applicable for this policy rule. This property defines the specific set of verbs such as "get", "list", "watch", "create", "delete", etc., that the policy rule applies to within the specified resources or URLs.

Applies to