Class: CDK8sPlus25::K8S::CustomResourceDefinitionNames
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- CDK8sPlus25::K8S::CustomResourceDefinitionNames
- Defined in:
- k8_s/custom_resource_definition_names.rb
Overview
CustomResourceDefinitionNames indicates the names to serve this CustomResourceDefinition.
Instance Attribute Summary collapse
-
#categories ⇒ Array<String>?
readonly
categories is a list of grouped resources this custom resource belongs to (e.g. 'all').
-
#kind ⇒ String
readonly
kind is the serialized kind of the resource.
-
#list_kind ⇒ String?
readonly
listKind is the serialized kind of the list for this resource.
-
#plural ⇒ String
readonly
plural is the plural name of the resource to serve.
-
#short_names ⇒ Array<String>?
readonly
shortNames are short names for the resource, exposed in API discovery documents, and used by clients to support invocations like
kubectl get <shortname>. -
#singular ⇒ String?
readonly
singular is the singular name of the resource.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(kind:, plural:, categories: nil, list_kind: nil, short_names: nil, singular: nil) ⇒ CustomResourceDefinitionNames
constructor
A new instance of CustomResourceDefinitionNames.
- #to_jsii ⇒ Object
Constructor Details
#initialize(kind:, plural:, categories: nil, list_kind: nil, short_names: nil, singular: nil) ⇒ CustomResourceDefinitionNames
Returns a new instance of CustomResourceDefinitionNames.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'k8_s/custom_resource_definition_names.rb', line 13 def initialize(kind:, plural:, categories: nil, list_kind: nil, short_names: nil, singular: nil) @kind = kind Jsii::Type.check_type(@kind, "eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==", "kind") @plural = plural Jsii::Type.check_type(@plural, "eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==", "plural") @categories = categories Jsii::Type.check_type(@categories, "eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=", "categories") unless @categories.nil? @list_kind = list_kind Jsii::Type.check_type(@list_kind, "eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==", "listKind") unless @list_kind.nil? @short_names = short_names Jsii::Type.check_type(@short_names, "eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=", "shortNames") unless @short_names.nil? @singular = singular Jsii::Type.check_type(@singular, "eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==", "singular") unless @singular.nil? end |
Instance Attribute Details
#categories ⇒ Array<String>? (readonly)
categories is a list of grouped resources this custom resource belongs to (e.g. 'all'). This is published in API discovery documents, and used by clients to support invocations like kubectl get all.
43 44 45 |
# File 'k8_s/custom_resource_definition_names.rb', line 43 def categories @categories end |
#kind ⇒ String (readonly)
kind is the serialized kind of the resource.
It is normally CamelCase and singular. Custom resource instances will use this value as the kind attribute in API calls.
33 34 35 |
# File 'k8_s/custom_resource_definition_names.rb', line 33 def kind @kind end |
#list_kind ⇒ String? (readonly)
Default: kind`List".
listKind is the serialized kind of the list for this resource.
Defaults to "kindList".
50 51 52 |
# File 'k8_s/custom_resource_definition_names.rb', line 50 def list_kind @list_kind end |
#plural ⇒ String (readonly)
plural is the plural name of the resource to serve.
The custom resources are served under /apis/<group>/<version>/.../<plural>. Must match the name of the CustomResourceDefinition (in the form <names.plural>.<group>). Must be all lowercase.
39 40 41 |
# File 'k8_s/custom_resource_definition_names.rb', line 39 def plural @plural end |
#short_names ⇒ Array<String>? (readonly)
shortNames are short names for the resource, exposed in API discovery documents, and used by clients to support invocations like kubectl get <shortname>.
It must be all lowercase.
56 57 58 |
# File 'k8_s/custom_resource_definition_names.rb', line 56 def short_names @short_names end |
#singular ⇒ String? (readonly)
Default: lowercased kind.
singular is the singular name of the resource.
It must be all lowercase. Defaults to lowercased kind.
63 64 65 |
# File 'k8_s/custom_resource_definition_names.rb', line 63 def singular @singular end |
Class Method Details
.jsii_properties ⇒ Object
65 66 67 68 69 70 71 72 73 74 |
# File 'k8_s/custom_resource_definition_names.rb', line 65 def self.jsii_properties { :kind => "kind", :plural => "plural", :categories => "categories", :list_kind => "listKind", :short_names => "shortNames", :singular => "singular", } end |
Instance Method Details
#to_jsii ⇒ Object
76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'k8_s/custom_resource_definition_names.rb', line 76 def to_jsii result = {} result.merge!({ "kind" => @kind, "plural" => @plural, "categories" => @categories, "listKind" => @list_kind, "shortNames" => @short_names, "singular" => @singular, }) result.compact end |