# Role

RoleRole is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.apiVersion: rbac.authorization.k8s.io/v1import "k8s.io/api/rbac/v1"RoleRole is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.apiVersion: rbac.authorization.k8s.io/v1kind: Rolemetadata (ObjectMeta)Standard object's metadata.rules ([]PolicyRule)Atomic: will be replaced during a mergeRules holds all the PolicyRules for this RolePolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to.rules.apiGroups ([]string)Atomic: will be replaced during a mergeAPIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed. "" represents the core API group and "*" represents all API groups.rules.resources ([]string)Atomic: will be replaced during a mergeResources is a list of resources this rule applies to. '*' represents all resources.rules.verbs ([]string), requiredAtomic: will be replaced during a mergeVerbs is a list of Verbs that apply to ALL the ResourceKinds contained in this rule. '*' represents all verbs.rules.resourceNames ([]string)Atomic: will be replaced during a mergeResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.rules.nonResourceURLs ([]string)Atomic: will be replaced during a mergeNonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as "pods" or "secrets") or non-resource URL paths (such as "/api"), but not both.RoleListRoleList is a collection of RolesapiVersion: rbac.authorization.k8s.io/v1kind: RoleListmetadata (ListMeta)Standard object's metadata.items ([]Role), requiredItems is a list of RolesOperationsget read the specified RoleHTTP RequestGET /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name}Parametersname (in path): string, requiredname of the Rolenamespace (in path): string, requirednamespacepretty (in query): stringprettyResponse200 (Role): OK401: Unauthorizedlist list or watch objects of kind RoleHTTP RequestGET /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolesParametersnamespace (in path): string, requirednamespaceallowWatchBookmarks (in query): booleanallowWatchBookmarkscontinue (in query): stringcontinuefieldSelector (in query): stringfieldSelectorlabelSelector (in query): stringlabelSelectorlimit (in query): integerlimitpretty (in query): stringprettyresourceVersion (in query): stringresourceVersionresourceVersionMatch (in query): stringresourceVersionMatchsendInitialEvents (in query): booleansendInitialEventstimeoutSeconds (in query): integertimeoutSecondswatch (in query): booleanwatchResponse200 (RoleList): OK401: Unauthorizedlist list or watch objects of kind RoleHTTP RequestGET /apis/rbac.authorization.k8s.io/v1/rolesParametersallowWatchBookmarks (in query): booleanallowWatchBookmarkscontinue (in query): stringcontinuefieldSelector (in query): stringfieldSelectorlabelSelector (in query): stringlabelSelectorlimit (in query): integerlimitpretty (in query): stringprettyresourceVersion (in query): stringresourceVersionresourceVersionMatch (in query): stringresourceVersionMatchsendInitialEvents (in query): booleansendInitialEventstimeoutSeconds (in query): integertimeoutSecondswatch (in query): booleanwatchResponse200 (RoleList): OK401: Unauthorizedcreate create a RoleHTTP RequestPOST /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolesParametersnamespace (in path): string, requirednamespacebody: Role, requireddryRun (in query): stringdryRunfieldManager (in query): stringfieldManagerfieldValidation (in query): stringfieldValidationpretty (in query): stringprettyResponse200 (Role): OK201 (Role): Created202 (Role): Accepted401: Unauthorizedupdate replace the specified RoleHTTP RequestPUT /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name}Parametersname (in path): string, requiredname of the Rolenamespace (in path): string, requirednamespacebody: Role, requireddryRun (in query): stringdryRunfieldManager (in query): stringfieldManagerfieldValidation (in query): stringfieldValidationpretty (in query): stringprettyResponse200 (Role): OK201 (Role): Created401: Unauthorizedpatch partially update the specified RoleHTTP RequestPATCH /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name}Parametersname (in path): string, requiredname of the Rolenamespace (in path): string, requirednamespacebody: Patch, requireddryRun (in query): stringdryRunfieldManager (in query): stringfieldManagerfieldValidation (in query): stringfieldValidationforce (in query): booleanforcepretty (in query): stringprettyResponse200 (Role): OK201 (Role): Created401: Unauthorizeddelete delete a RoleHTTP RequestDELETE /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name}Parametersname (in path): string, requiredname of the Rolenamespace (in path): string, requirednamespacebody: DeleteOptionsdryRun (in query): stringdryRungracePeriodSeconds (in query): integergracePeriodSecondsignoreStoreReadErrorWithClusterBreakingPotential (in query): booleanignoreStoreReadErrorWithClusterBreakingPotentialpretty (in query): stringprettypropagationPolicy (in query): stringpropagationPolicyResponse200 (Status): OK202 (Status): Accepted401: Unauthorizeddeletecollection delete collection of RoleHTTP RequestDELETE /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolesParametersnamespace (in path): string, requirednamespacebody: DeleteOptionscontinue (in query): stringcontinuedryRun (in query): stringdryRunfieldSelector (in query): stringfieldSelectorgracePeriodSeconds (in query): integergracePeriodSecondsignoreStoreReadErrorWithClusterBreakingPotential (in query): booleanignoreStoreReadErrorWithClusterBreakingPotentiallabelSelector (in query): stringlabelSelectorlimit (in query): integerlimitpretty (in query): stringprettypropagationPolicy (in query): stringpropagationPolicyresourceVersion (in query): stringresourceVersionresourceVersionMatch (in query): stringresourceVersionMatchsendInitialEvents (in query): booleansendInitialEventstimeoutSeconds (in query): integertimeoutSecondsResponse200 (Status): OK401: UnauthorizedThis page is automatically generated.If you plan to report an issue with this page, mention that the page is auto-generated in your issue description. The fix may need to happen elsewhere in the Kubernetes project.