Class: CDK8sPlus25::K8S::KubeCustomResourceDefinitionProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- CDK8sPlus25::K8S::KubeCustomResourceDefinitionProps
- Defined in:
- k8_s/kube_custom_resource_definition_props.rb
Overview
CustomResourceDefinition represents a resource that should be exposed on the API server.
Its name MUST be in the format <.spec.name>.<.spec.group>.
Instance Attribute Summary collapse
-
#metadata ⇒ CDK8sPlus25::K8S::ObjectMeta?
readonly
Standard object's metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
-
#spec ⇒ CDK8sPlus25::K8S::CustomResourceDefinitionSpec
readonly
spec describes how the user wants the resources to appear.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(spec:, metadata: nil) ⇒ KubeCustomResourceDefinitionProps
constructor
A new instance of KubeCustomResourceDefinitionProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(spec:, metadata: nil) ⇒ KubeCustomResourceDefinitionProps
Returns a new instance of KubeCustomResourceDefinitionProps.
11 12 13 14 15 16 |
# File 'k8_s/kube_custom_resource_definition_props.rb', line 11 def initialize(spec:, metadata: nil) @spec = spec.is_a?(Hash) ? ::CDK8sPlus25::K8S::CustomResourceDefinitionSpec.new(**spec.transform_keys(&:to_sym)) : spec Jsii::Type.check_type(@spec, "eyJmcW4iOiJjZGs4cy1wbHVzLTI1Lms4cy5DdXN0b21SZXNvdXJjZURlZmluaXRpb25TcGVjIn0=", "spec") @metadata = .is_a?(Hash) ? ::CDK8sPlus25::K8S::ObjectMeta.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(@metadata, "eyJmcW4iOiJjZGs4cy1wbHVzLTI1Lms4cy5PYmplY3RNZXRhIn0=", "metadata") unless @metadata.nil? end |
Instance Attribute Details
#metadata ⇒ CDK8sPlus25::K8S::ObjectMeta? (readonly)
Standard object's metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
25 26 27 |
# File 'k8_s/kube_custom_resource_definition_props.rb', line 25 def @metadata end |
#spec ⇒ CDK8sPlus25::K8S::CustomResourceDefinitionSpec (readonly)
spec describes how the user wants the resources to appear.
21 22 23 |
# File 'k8_s/kube_custom_resource_definition_props.rb', line 21 def spec @spec end |
Class Method Details
.jsii_properties ⇒ Object
27 28 29 30 31 32 |
# File 'k8_s/kube_custom_resource_definition_props.rb', line 27 def self.jsii_properties { :spec => "spec", :metadata => "metadata", } end |
Instance Method Details
#to_jsii ⇒ Object
34 35 36 37 38 39 40 41 |
# File 'k8_s/kube_custom_resource_definition_props.rb', line 34 def to_jsii result = {} result.merge!({ "spec" => @spec, "metadata" => @metadata, }) result.compact end |