KubectlAuthCanISettings Class

Summary

Check whether an action is allowed. VERB is a logical Kubectl API verb like 'get', 'list', 'watch', 'delete', etc. TYPE is a Kubectl resource. Shortcuts and groups will be resolved. NONRESOURCEURL is a partial URL starts with "/". NAME is the name of a particular Kubectl resource.
Assembly
Cake.Kubectl.dll
Namespace
Cake.Kubectl
Base Types
graph BT Type-->Base0["AutoToolSettings"] click Base0 "/api/Cake.Kubectl/AutoToolSettings" Base0-->Base1["ToolSettings"] Type["KubectlAuthCanISettings"] class Type type-node

Syntax

public sealed class KubectlAuthCanISettings : AutoToolSettings

Examples

# Check to see if I can create pods in any namespace kubectl auth can-i create pods --all-namespaces # Check to see if I can list deployments in my current namespace kubectl auth can-i list deployments.extensions # Check to see if I can do everything in my current namespace ("*" means all) kubectl auth can-i '*' '*' # Check to see if I can get the job named "bar" in namespace "foo" kubectl auth can-i list jobs.batch/bar -n foo # Check to see if I can read pod logs kubectl auth can-i get pods --subresource=log # Check to see if I can access the URL /logs/ kubectl auth can-i get /logs/ # List all allowed actions in namespace "foo" kubectl auth can-i --list --namespace=foo

Attributes

Type Description
CompilerGeneratedAttribute

Constructors

Properties

Name Value Summary
AllNamespaces Nullable<bool>
-A, --all-namespaces If true, check the specified action in all namespaces.
List Nullable<bool>
--list If true, prints all allowed actions.
NoHeaders Nullable<bool>
--no-headers If true, prints allowed actions without headers
Quiet Nullable<bool>
-q, --quiet If true, suppress output and just return the exit code.
Subresource string
--subresource SubResource such as pod/log or deployment/scale

Extension Methods

Name Value Summary
Dump<KubectlAuthCanISettings>() string
Get a basic string representation of specified object.
Requires the Cake.Incubator addin
IsIn<KubectlAuthCanISettings>(KubectlAuthCanISettings[]) bool
Checks if the source is contained in a list
Requires the Cake.Incubator addin
NotNull<KubectlAuthCanISettings>(string) void
Throws an exception if the specified parameter's value is null.
Requires the Cake.Ftp addin
NotNull<KubectlAuthCanISettings>(string) void
Throws an exception if the specified parameter's value is null.
Requires the Cake.Issues addin
ThrowIfNull<KubectlAuthCanISettings>(string) T
Throws a System.ArgumentNullException if the value is null, otherwise returns the value
Requires the Cake.Incubator addin
ThrowIfNull<KubectlAuthCanISettings>(string, string) T
Throws a System.ArgumentNullException with a specific message if the value is null, otherwise returns the value
Requires the Cake.Incubator addin