Skip to main content

kcr_lambda_services_k8s_aws/v1alpha1/
codesigningconfigs.rs

1// WARNING: generated by kopium - manual changes will be overwritten
2// kopium command: kopium --docs --derive=Default --derive=PartialEq --smart-derive-elision --filename crd-catalog/aws-controllers-k8s/lambda-controller/lambda.services.k8s.aws/v1alpha1/codesigningconfigs.yaml
3// kopium version: 0.23.0
4
5#[allow(unused_imports)]
6mod prelude {
7    pub use kube::CustomResource;
8    pub use serde::{Serialize, Deserialize};
9    pub use k8s_openapi::apimachinery::pkg::apis::meta::v1::Condition;
10}
11
12use self::prelude::*;
13
14/// CodeSigningConfigSpec defines the desired state of CodeSigningConfig.
15/// 
16/// Details about a Code signing configuration (<https://docs.aws.amazon.com/lambda/latest/dg/configuration-codesigning.html).>
17#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
18#[kube(group = "lambda.services.k8s.aws", version = "v1alpha1", kind = "CodeSigningConfig", plural = "codesigningconfigs")]
19#[kube(namespaced)]
20#[kube(status = "CodeSigningConfigStatus")]
21#[kube(schema = "disabled")]
22#[kube(derive="Default")]
23#[kube(derive="PartialEq")]
24pub struct CodeSigningConfigSpec {
25    /// Signing profiles for this code signing configuration.
26    #[serde(rename = "allowedPublishers")]
27    pub allowed_publishers: CodeSigningConfigAllowedPublishers,
28    /// The code signing policies define the actions to take if the validation checks
29    /// fail.
30    #[serde(default, skip_serializing_if = "Option::is_none", rename = "codeSigningPolicies")]
31    pub code_signing_policies: Option<CodeSigningConfigCodeSigningPolicies>,
32    /// Descriptive name for this code signing configuration.
33    #[serde(default, skip_serializing_if = "Option::is_none")]
34    pub description: Option<String>,
35}
36
37/// Signing profiles for this code signing configuration.
38#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
39pub struct CodeSigningConfigAllowedPublishers {
40    #[serde(default, skip_serializing_if = "Option::is_none", rename = "signingProfileVersionARNs")]
41    pub signing_profile_version_ar_ns: Option<Vec<String>>,
42}
43
44/// The code signing policies define the actions to take if the validation checks
45/// fail.
46#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
47pub struct CodeSigningConfigCodeSigningPolicies {
48    #[serde(default, skip_serializing_if = "Option::is_none", rename = "untrustedArtifactOnDeployment")]
49    pub untrusted_artifact_on_deployment: Option<String>,
50}
51
52/// CodeSigningConfigStatus defines the observed state of CodeSigningConfig
53#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
54pub struct CodeSigningConfigStatus {
55    /// All CRs managed by ACK have a common `Status.ACKResourceMetadata` member
56    /// that is used to contain resource sync state, account ownership,
57    /// constructed ARN for the resource
58    #[serde(default, skip_serializing_if = "Option::is_none", rename = "ackResourceMetadata")]
59    pub ack_resource_metadata: Option<CodeSigningConfigStatusAckResourceMetadata>,
60    /// Unique identifer for the Code signing configuration.
61    /// 
62    /// Regex Pattern: `^csc-[a-zA-Z0-9-_\.]{17}$`
63    #[serde(default, skip_serializing_if = "Option::is_none", rename = "codeSigningConfigID")]
64    pub code_signing_config_id: Option<String>,
65    /// All CRs managed by ACK have a common `Status.Conditions` member that
66    /// contains a collection of `ackv1alpha1.Condition` objects that describe
67    /// the various terminal states of the CR and its backend AWS service API
68    /// resource
69    #[serde(default, skip_serializing_if = "Option::is_none")]
70    pub conditions: Option<Vec<Condition>>,
71    /// The date and time that the Code signing configuration was last modified,
72    /// in ISO-8601 format (YYYY-MM-DDThh:mm:ss.sTZD).
73    #[serde(default, skip_serializing_if = "Option::is_none", rename = "lastModified")]
74    pub last_modified: Option<String>,
75}
76
77/// All CRs managed by ACK have a common `Status.ACKResourceMetadata` member
78/// that is used to contain resource sync state, account ownership,
79/// constructed ARN for the resource
80#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
81pub struct CodeSigningConfigStatusAckResourceMetadata {
82    /// ARN is the Amazon Resource Name for the resource. This is a
83    /// globally-unique identifier and is set only by the ACK service controller
84    /// once the controller has orchestrated the creation of the resource OR
85    /// when it has verified that an "adopted" resource (a resource where the
86    /// ARN annotation was set by the Kubernetes user on the CR) exists and
87    /// matches the supplied CR's Spec field values.
88    /// <https://github.com/aws/aws-controllers-k8s/issues/270>
89    #[serde(default, skip_serializing_if = "Option::is_none")]
90    pub arn: Option<String>,
91    /// OwnerAccountID is the AWS Account ID of the account that owns the
92    /// backend AWS service API resource.
93    #[serde(rename = "ownerAccountID")]
94    pub owner_account_id: String,
95    /// Partition is the AWS partition in which the resource exists or will exist
96    #[serde(default, skip_serializing_if = "Option::is_none")]
97    pub partition: Option<String>,
98    /// Region is the AWS region in which the resource exists or will exist.
99    pub region: String,
100}
101