winterbaume_cloudformation/
types.rs1use serde::{Deserialize, Serialize};
2
3#[derive(Debug, Clone, Serialize, Deserialize)]
4pub struct Stack {
5 pub stack_id: String,
6 pub stack_name: String,
7 pub stack_status: String,
8 pub creation_time: String,
9 pub last_updated_time: Option<String>,
10 pub deletion_time: Option<String>,
11 pub description: Option<String>,
12 pub template_body: Option<String>,
13 pub stack_policy_body: Option<String>,
14 pub parameters: Vec<StackParameter>,
15 pub outputs: Vec<StackOutput>,
16 pub tags: Vec<StackTag>,
17 pub capabilities: Vec<String>,
18 pub resources: Vec<StackResource>,
19 pub events: Vec<StackEvent>,
20 pub change_sets: Vec<ChangeSet>,
21 pub exports: Vec<StackExport>,
22 pub role_arn: Option<String>,
23 pub timeout_in_minutes: Option<i32>,
24 pub disable_rollback: bool,
25 pub enable_termination_protection: bool,
26}
27
28#[derive(Debug, Clone, Serialize, Deserialize)]
29pub struct StackParameter {
30 pub parameter_key: String,
31 pub parameter_value: String,
32}
33
34#[derive(Debug, Clone, Serialize, Deserialize)]
35pub struct StackOutput {
36 pub output_key: String,
37 pub output_value: String,
38 pub description: Option<String>,
39 pub export_name: Option<String>,
40}
41
42#[derive(Debug, Clone, Serialize, Deserialize)]
43pub struct StackTag {
44 pub key: String,
45 pub value: String,
46}
47
48#[derive(Debug, Clone, Serialize, Deserialize)]
49pub struct StackResource {
50 pub logical_resource_id: String,
51 pub physical_resource_id: Option<String>,
52 pub resource_type: String,
53 pub resource_status: String,
54 pub timestamp: String,
55 pub stack_id: String,
56 pub stack_name: String,
57}
58
59#[derive(Debug, Clone, Serialize, Deserialize)]
60pub struct StackEvent {
61 pub event_id: String,
62 pub stack_id: String,
63 pub stack_name: String,
64 pub logical_resource_id: String,
65 pub physical_resource_id: Option<String>,
66 pub resource_type: String,
67 pub timestamp: String,
68 pub resource_status: String,
69 pub resource_status_reason: Option<String>,
70}
71
72#[derive(Debug, Clone, Serialize, Deserialize)]
73pub struct StackExport {
74 pub name: String,
75 pub value: String,
76 pub exporting_stack_id: String,
77}
78
79#[derive(Debug, Clone, Serialize, Deserialize)]
80pub struct ChangeSet {
81 pub change_set_id: String,
82 pub change_set_name: String,
83 pub stack_id: String,
84 pub stack_name: String,
85 pub status: String,
86 pub status_reason: Option<String>,
87 pub execution_status: String,
88 pub description: Option<String>,
89 pub creation_time: String,
90 pub parameters: Vec<StackParameter>,
91 pub tags: Vec<StackTag>,
92}
93
94#[derive(Debug, Clone, Serialize, Deserialize)]
95pub struct StackSet {
96 pub stack_set_id: String,
97 pub stack_set_name: String,
98 pub stack_set_arn: String,
99 pub status: String,
100 pub description: Option<String>,
101 pub template_body: Option<String>,
102 pub parameters: Vec<StackParameter>,
103 pub tags: Vec<StackTag>,
104 pub capabilities: Vec<String>,
105 pub operations: Vec<StackSetOperation>,
106}
107
108#[derive(Debug, Clone, Serialize, Deserialize)]
109pub struct StackSetOperation {
110 pub operation_id: String,
111 pub action: String,
112 pub status: String,
113 pub creation_timestamp: String,
114 pub end_timestamp: Option<String>,
115 pub stack_set_id: String,
116 pub results: Vec<StackSetOperationResult>,
117}
118
119#[derive(Debug, Clone, Serialize, Deserialize)]
120pub struct StackSetOperationResult {
121 pub account: String,
122 pub region: String,
123 pub status: String,
124 pub status_reason: Option<String>,
125}
126
127#[derive(Debug, Clone, Serialize, Deserialize)]
128pub struct StackInstance {
129 pub stack_set_name: String,
130 pub account: String,
131 pub region: String,
132 pub stack_id: Option<String>,
133 pub status: String,
134 pub status_reason: Option<String>,
135 pub stack_set_id: String,
136 pub parameter_overrides: Vec<StackParameter>,
137}
138
139#[derive(Debug, Clone, PartialEq, Eq, Hash)]
141pub struct StackKey(pub String);
142
143#[derive(Debug, Clone, PartialEq, Eq, Hash)]
145pub struct StackInstanceKey {
146 pub stack_set_name: String,
147 pub account: String,
148 pub region: String,
149}
150
151#[derive(Debug, Clone, Serialize, Deserialize)]
153pub struct RegisteredType {
154 pub type_name: String,
155 pub type_kind: String,
156 pub type_arn: Option<String>,
157 pub default_version_id: Option<String>,
158 pub last_updated: Option<String>,
159 pub description: Option<String>,
160}