Package org.cdk8s.plus24
Class Resource
- java.lang.Object
-
- software.amazon.jsii.JsiiObject
-
- software.constructs.Construct
-
- org.cdk8s.plus24.Resource
-
- All Implemented Interfaces:
IApiEndpoint
,IApiResource
,IResource
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
- Direct Known Subclasses:
AbstractPod
,ClusterRole
,ClusterRoleBinding
,ConfigMap
,HorizontalPodAutoscaler
,Ingress
,Namespace
,NetworkPolicy
,PersistentVolume
,PersistentVolumeClaim
,Role
,RoleBinding
,Secret
,Service
,ServiceAccount
@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-02-04T02:31:04.980Z") @Stability(Stable) public abstract class Resource extends software.constructs.Construct implements IResource, IApiResource, IApiEndpoint
Base class for all Kubernetes objects in stdk8s.Represents a single resource.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
-
Nested classes/interfaces inherited from interface org.cdk8s.plus24.IApiEndpoint
IApiEndpoint.Jsii$Default
-
Nested classes/interfaces inherited from interface org.cdk8s.plus24.IApiResource
IApiResource.Jsii$Default
-
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
-
Nested classes/interfaces inherited from interface org.cdk8s.plus24.IResource
IResource.Jsii$Default
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description IApiResource
asApiResource()
Return the IApiResource this object represents.String
asNonApiResource()
Return the non resource url this object represents.String
getApiGroup()
The group portion of the API version (e.g.protected abstract org.cdk8s.ApiObject
getApiObject()
The underlying cdk8s API object.String
getApiVersion()
The object's API version (e.g.String
getKind()
The object kind (e.g.org.cdk8s.ApiObjectMetadataDefinition
getMetadata()
String
getName()
The name of this API object.ResourcePermissions
getPermissions()
String
getResourceName()
The unique, namespace-global, name of an object inside the Kubernetes cluster.abstract String
getResourceType()
The name of a resource type as it appears in the relevant API endpoint.-
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
-
-
-
-
Constructor Detail
-
Resource
protected Resource(software.amazon.jsii.JsiiObjectRef objRef)
-
Resource
protected Resource(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
-
Resource
@Stability(Stable) protected Resource(@NotNull software.constructs.Construct scope, @NotNull String id)
- Parameters:
scope
- This parameter is required.id
- This parameter is required.
-
-
Method Detail
-
asApiResource
@Stability(Stable) @Nullable public IApiResource asApiResource()
Return the IApiResource this object represents.- Specified by:
asApiResource
in interfaceIApiEndpoint
-
asNonApiResource
@Stability(Stable) @Nullable public String asNonApiResource()
Return the non resource url this object represents.- Specified by:
asNonApiResource
in interfaceIApiEndpoint
-
getApiGroup
@Stability(Stable) @NotNull public String getApiGroup()
The group portion of the API version (e.g. "authorization.k8s.io").- Specified by:
getApiGroup
in interfaceIApiResource
-
getApiObject
@Stability(Stable) @NotNull protected abstract org.cdk8s.ApiObject getApiObject()
The underlying cdk8s API object.
-
getApiVersion
@Stability(Stable) @NotNull public String getApiVersion()
The object's API version (e.g. "authorization.k8s.io/v1").- Specified by:
getApiVersion
in interfaceIResource
-
getKind
@Stability(Stable) @NotNull public String getKind()
The object kind (e.g. "Deployment").
-
getMetadata
@Stability(Stable) @NotNull public org.cdk8s.ApiObjectMetadataDefinition getMetadata()
-
getName
@Stability(Stable) @NotNull public String getName()
The name of this API object.
-
getPermissions
@Stability(Stable) @NotNull public ResourcePermissions getPermissions()
-
getResourceType
@Stability(Stable) @NotNull public abstract String getResourceType()
The name of a resource type as it appears in the relevant API endpoint.- Specified by:
getResourceType
in interfaceIApiResource
- See Also:
- https://kubernetes.io/docs/reference/access-authn-authz/rbac/#referring-to-resources
-
getResourceName
@Stability(Stable) @Nullable public String getResourceName()
The unique, namespace-global, name of an object inside the Kubernetes cluster.If this is omitted, the ApiResource should represent all objects of the given type.
- Specified by:
getResourceName
in interfaceIApiResource
-
-