kcr_lambda_services_k8s_aws 3.20260602.223721

Kubernetes Custom Resource Bindings
Documentation
// WARNING: generated by kopium - manual changes will be overwritten
// kopium command: kopium --docs --derive=Default --derive=PartialEq --smart-derive-elision --filename crd-catalog/aws-controllers-k8s/lambda-controller/lambda.services.k8s.aws/v1alpha1/layerversions.yaml
// kopium version: 0.23.0

#[allow(unused_imports)]
mod prelude {
    pub use kube::CustomResource;
    pub use serde::{Serialize, Deserialize};
    pub use k8s_openapi::apimachinery::pkg::apis::meta::v1::Condition;
}

use self::prelude::*;

/// LayerVersionSpec defines the desired state of LayerVersion.
#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
#[kube(group = "lambda.services.k8s.aws", version = "v1alpha1", kind = "LayerVersion", plural = "layerversions")]
#[kube(namespaced)]
#[kube(status = "LayerVersionStatus")]
#[kube(schema = "disabled")]
#[kube(derive="Default")]
#[kube(derive="PartialEq")]
pub struct LayerVersionSpec {
    /// A list of compatible instruction set architectures (<https://docs.aws.amazon.com/lambda/latest/dg/foundation-arch.html).>
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "compatibleArchitectures")]
    pub compatible_architectures: Option<Vec<String>>,
    /// A list of compatible function runtimes (<https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html).>
    /// Used for filtering with ListLayers and ListLayerVersions.
    /// 
    /// The following list includes deprecated runtimes. For more information, see
    /// Runtime deprecation policy (<https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtime-support-policy).>
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "compatibleRuntimes")]
    pub compatible_runtimes: Option<Vec<String>>,
    /// The function layer archive.
    pub content: LayerVersionContent,
    /// The description of the version.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    /// The name or Amazon Resource Name (ARN) of the layer.
    /// 
    /// Regex Pattern: `^(arn:[a-zA-Z0-9-]+:lambda:[a-zA-Z0-9-]+:\d{12}:layer:[a-zA-Z0-9-_]+)|[a-zA-Z0-9-_]+$`
    #[serde(rename = "layerName")]
    pub layer_name: String,
    /// The layer's software license. It can be any of the following:
    /// 
    ///    * An SPDX license identifier (<https://spdx.org/licenses/).> For example,
    ///    MIT.
    /// 
    ///    * The URL of a license hosted on the internet. For example, <https://opensource.org/licenses/MIT.>
    /// 
    ///    * The full text of the license.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "licenseInfo")]
    pub license_info: Option<String>,
}

/// The function layer archive.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct LayerVersionContent {
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "s3Bucket")]
    pub s3_bucket: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "s3Key")]
    pub s3_key: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "s3ObjectVersion")]
    pub s3_object_version: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "zipFile")]
    pub zip_file: Option<String>,
}

/// LayerVersionStatus defines the observed state of LayerVersion
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct LayerVersionStatus {
    /// All CRs managed by ACK have a common `Status.ACKResourceMetadata` member
    /// that is used to contain resource sync state, account ownership,
    /// constructed ARN for the resource
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "ackResourceMetadata")]
    pub ack_resource_metadata: Option<LayerVersionStatusAckResourceMetadata>,
    /// All CRs managed by ACK have a common `Status.Conditions` member that
    /// contains a collection of `ackv1alpha1.Condition` objects that describe
    /// the various terminal states of the CR and its backend AWS service API
    /// resource
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub conditions: Option<Vec<Condition>>,
    /// The date that the layer version was created, in ISO-8601 format (<https://www.w3.org/TR/NOTE-datetime)>
    /// (YYYY-MM-DDThh:mm:ss.sTZD).
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "createdDate")]
    pub created_date: Option<String>,
    /// The ARN of the layer.
    /// 
    /// Regex Pattern: `^arn:[a-zA-Z0-9-]+:lambda:[a-zA-Z0-9-]+:\d{12}:layer:[a-zA-Z0-9-_]+$`
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "layerARN")]
    pub layer_arn: Option<String>,
    /// The version number.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "versionNumber")]
    pub version_number: Option<i64>,
}

/// All CRs managed by ACK have a common `Status.ACKResourceMetadata` member
/// that is used to contain resource sync state, account ownership,
/// constructed ARN for the resource
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct LayerVersionStatusAckResourceMetadata {
    /// ARN is the Amazon Resource Name for the resource. This is a
    /// globally-unique identifier and is set only by the ACK service controller
    /// once the controller has orchestrated the creation of the resource OR
    /// when it has verified that an "adopted" resource (a resource where the
    /// ARN annotation was set by the Kubernetes user on the CR) exists and
    /// matches the supplied CR's Spec field values.
    /// <https://github.com/aws/aws-controllers-k8s/issues/270>
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub arn: Option<String>,
    /// OwnerAccountID is the AWS Account ID of the account that owns the
    /// backend AWS service API resource.
    #[serde(rename = "ownerAccountID")]
    pub owner_account_id: String,
    /// Partition is the AWS partition in which the resource exists or will exist
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub partition: Option<String>,
    /// Region is the AWS region in which the resource exists or will exist.
    pub region: String,
}