AWS SDK for C++

AWS SDK for C++ Version 1.11.926

Loading...
Searching...
No Matches
EksContainerSecurityContext.h
1
6#pragma once
7#include <aws/batch/Batch_EXPORTS.h>
8#include <aws/batch/model/EksContainerLinuxCapabilities.h>
9#include <aws/batch/model/EksSeccompProfile.h>
10
11#include <utility>
12
13namespace Aws {
14namespace Utils {
15namespace Json {
16class JsonValue;
17class JsonView;
18} // namespace Json
19} // namespace Utils
20namespace Batch {
21namespace Model {
22
32 public:
33 AWS_BATCH_API EksContainerSecurityContext() = default;
36 AWS_BATCH_API Aws::Utils::Json::JsonValue Jsonize() const;
37
39
48 inline long long GetRunAsUser() const { return m_runAsUser; }
49 inline bool RunAsUserHasBeenSet() const { return m_runAsUserHasBeenSet; }
50 inline void SetRunAsUser(long long value) {
51 m_runAsUserHasBeenSet = true;
52 m_runAsUser = value;
53 }
54 inline EksContainerSecurityContext& WithRunAsUser(long long value) {
55 SetRunAsUser(value);
56 return *this;
57 }
59
61
70 inline long long GetRunAsGroup() const { return m_runAsGroup; }
71 inline bool RunAsGroupHasBeenSet() const { return m_runAsGroupHasBeenSet; }
72 inline void SetRunAsGroup(long long value) {
73 m_runAsGroupHasBeenSet = true;
74 m_runAsGroup = value;
75 }
77 SetRunAsGroup(value);
78 return *this;
79 }
81
83
92 inline bool GetPrivileged() const { return m_privileged; }
93 inline bool PrivilegedHasBeenSet() const { return m_privilegedHasBeenSet; }
94 inline void SetPrivileged(bool value) {
95 m_privilegedHasBeenSet = true;
96 m_privileged = value;
97 }
99 SetPrivileged(value);
100 return *this;
101 }
103
105
109 inline bool GetAllowPrivilegeEscalation() const { return m_allowPrivilegeEscalation; }
110 inline bool AllowPrivilegeEscalationHasBeenSet() const { return m_allowPrivilegeEscalationHasBeenSet; }
111 inline void SetAllowPrivilegeEscalation(bool value) {
112 m_allowPrivilegeEscalationHasBeenSet = true;
113 m_allowPrivilegeEscalation = value;
114 }
117 return *this;
118 }
120
122
130 inline bool GetReadOnlyRootFilesystem() const { return m_readOnlyRootFilesystem; }
131 inline bool ReadOnlyRootFilesystemHasBeenSet() const { return m_readOnlyRootFilesystemHasBeenSet; }
132 inline void SetReadOnlyRootFilesystem(bool value) {
133 m_readOnlyRootFilesystemHasBeenSet = true;
134 m_readOnlyRootFilesystem = value;
135 }
138 return *this;
139 }
141
143
151 inline bool GetRunAsNonRoot() const { return m_runAsNonRoot; }
152 inline bool RunAsNonRootHasBeenSet() const { return m_runAsNonRootHasBeenSet; }
153 inline void SetRunAsNonRoot(bool value) {
154 m_runAsNonRootHasBeenSet = true;
155 m_runAsNonRoot = value;
156 }
158 SetRunAsNonRoot(value);
159 return *this;
160 }
162
164
169 inline const EksContainerLinuxCapabilities& GetCapabilities() const { return m_capabilities; }
170 inline bool CapabilitiesHasBeenSet() const { return m_capabilitiesHasBeenSet; }
171 template <typename CapabilitiesT = EksContainerLinuxCapabilities>
172 void SetCapabilities(CapabilitiesT&& value) {
173 m_capabilitiesHasBeenSet = true;
174 m_capabilities = std::forward<CapabilitiesT>(value);
175 }
176 template <typename CapabilitiesT = EksContainerLinuxCapabilities>
178 SetCapabilities(std::forward<CapabilitiesT>(value));
179 return *this;
180 }
182
184
191 inline const EksSeccompProfile& GetSeccompProfile() const { return m_seccompProfile; }
192 inline bool SeccompProfileHasBeenSet() const { return m_seccompProfileHasBeenSet; }
193 template <typename SeccompProfileT = EksSeccompProfile>
194 void SetSeccompProfile(SeccompProfileT&& value) {
195 m_seccompProfileHasBeenSet = true;
196 m_seccompProfile = std::forward<SeccompProfileT>(value);
197 }
198 template <typename SeccompProfileT = EksSeccompProfile>
200 SetSeccompProfile(std::forward<SeccompProfileT>(value));
201 return *this;
202 }
204 private:
205 long long m_runAsUser{0};
206
207 long long m_runAsGroup{0};
208
209 bool m_privileged{false};
210
211 bool m_allowPrivilegeEscalation{false};
212
213 bool m_readOnlyRootFilesystem{false};
214
215 bool m_runAsNonRoot{false};
216
217 EksContainerLinuxCapabilities m_capabilities;
218
219 EksSeccompProfile m_seccompProfile;
220 bool m_runAsUserHasBeenSet = false;
221 bool m_runAsGroupHasBeenSet = false;
222 bool m_privilegedHasBeenSet = false;
223 bool m_allowPrivilegeEscalationHasBeenSet = false;
224 bool m_readOnlyRootFilesystemHasBeenSet = false;
225 bool m_runAsNonRootHasBeenSet = false;
226 bool m_capabilitiesHasBeenSet = false;
227 bool m_seccompProfileHasBeenSet = false;
228};
229
230} // namespace Model
231} // namespace Batch
232} // namespace Aws
AWS_BATCH_API EksContainerSecurityContext & operator=(Aws::Utils::Json::JsonView jsonValue)
const EksContainerLinuxCapabilities & GetCapabilities() const
EksContainerSecurityContext & WithRunAsUser(long long value)
EksContainerSecurityContext & WithRunAsNonRoot(bool value)
AWS_BATCH_API EksContainerSecurityContext()=default
AWS_BATCH_API EksContainerSecurityContext(Aws::Utils::Json::JsonView jsonValue)
EksContainerSecurityContext & WithSeccompProfile(SeccompProfileT &&value)
EksContainerSecurityContext & WithAllowPrivilegeEscalation(bool value)
EksContainerSecurityContext & WithReadOnlyRootFilesystem(bool value)
EksContainerSecurityContext & WithCapabilities(CapabilitiesT &&value)
EksContainerSecurityContext & WithRunAsGroup(long long value)
AWS_BATCH_API Aws::Utils::Json::JsonValue Jsonize() const
EksContainerSecurityContext & WithPrivileged(bool value)
Aws::Utils::Json::JsonValue JsonValue