33namespace AsyncAws \Athena \Input ;
44
55use AsyncAws \Athena \ValueObject \EngineConfiguration ;
6+ use AsyncAws \Athena \ValueObject \MonitoringConfiguration ;
7+ use AsyncAws \Athena \ValueObject \Tag ;
68use AsyncAws \Core \Exception \InvalidArgument ;
79use AsyncAws \Core \Input ;
810use AsyncAws \Core \Request ;
@@ -35,6 +37,22 @@ final class StartSessionRequest extends Input
3537 */
3638 private $ engineConfiguration ;
3739
40+ /**
41+ * The ARN of the execution role used to access user resources for Spark sessions and Identity Center enabled
42+ * workgroups. This property applies only to Spark enabled workgroups and Identity Center enabled workgroups.
43+ *
44+ * @var string|null
45+ */
46+ private $ executionRole ;
47+
48+ /**
49+ * Contains the configuration settings for managed log persistence, delivering logs to Amazon S3 buckets, Amazon
50+ * CloudWatch log groups etc.
51+ *
52+ * @var MonitoringConfiguration|null
53+ */
54+ private $ monitoringConfiguration ;
55+
3856 /**
3957 * The notebook version. This value is supplied automatically for notebook sessions in the Athena console and is not
4058 * required for programmatic session access. The only valid notebook version is `Athena notebook version 1`. If you
@@ -65,14 +83,32 @@ final class StartSessionRequest extends Input
6583 */
6684 private $ clientRequestToken ;
6785
86+ /**
87+ * A list of comma separated tags to add to the session that is created.
88+ *
89+ * @var Tag[]|null
90+ */
91+ private $ tags ;
92+
93+ /**
94+ * Copies the tags from the Workgroup to the Session when.
95+ *
96+ * @var bool|null
97+ */
98+ private $ copyWorkGroupTags ;
99+
68100 /**
69101 * @param array{
70102 * Description?: string|null,
71103 * WorkGroup?: string,
72104 * EngineConfiguration?: EngineConfiguration|array,
105+ * ExecutionRole?: string|null,
106+ * MonitoringConfiguration?: MonitoringConfiguration|array|null,
73107 * NotebookVersion?: string|null,
74108 * SessionIdleTimeoutInMinutes?: int|null,
75109 * ClientRequestToken?: string|null,
110+ * Tags?: array<Tag|array>|null,
111+ * CopyWorkGroupTags?: bool|null,
76112 * '@region'?: string|null,
77113 * } $input
78114 */
@@ -81,9 +117,13 @@ public function __construct(array $input = [])
81117 $ this ->description = $ input ['Description ' ] ?? null ;
82118 $ this ->workGroup = $ input ['WorkGroup ' ] ?? null ;
83119 $ this ->engineConfiguration = isset ($ input ['EngineConfiguration ' ]) ? EngineConfiguration::create ($ input ['EngineConfiguration ' ]) : null ;
120+ $ this ->executionRole = $ input ['ExecutionRole ' ] ?? null ;
121+ $ this ->monitoringConfiguration = isset ($ input ['MonitoringConfiguration ' ]) ? MonitoringConfiguration::create ($ input ['MonitoringConfiguration ' ]) : null ;
84122 $ this ->notebookVersion = $ input ['NotebookVersion ' ] ?? null ;
85123 $ this ->sessionIdleTimeoutInMinutes = $ input ['SessionIdleTimeoutInMinutes ' ] ?? null ;
86124 $ this ->clientRequestToken = $ input ['ClientRequestToken ' ] ?? null ;
125+ $ this ->tags = isset ($ input ['Tags ' ]) ? array_map ([Tag::class, 'create ' ], $ input ['Tags ' ]) : null ;
126+ $ this ->copyWorkGroupTags = $ input ['CopyWorkGroupTags ' ] ?? null ;
87127 parent ::__construct ($ input );
88128 }
89129
@@ -92,9 +132,13 @@ public function __construct(array $input = [])
92132 * Description?: string|null,
93133 * WorkGroup?: string,
94134 * EngineConfiguration?: EngineConfiguration|array,
135+ * ExecutionRole?: string|null,
136+ * MonitoringConfiguration?: MonitoringConfiguration|array|null,
95137 * NotebookVersion?: string|null,
96138 * SessionIdleTimeoutInMinutes?: int|null,
97139 * ClientRequestToken?: string|null,
140+ * Tags?: array<Tag|array>|null,
141+ * CopyWorkGroupTags?: bool|null,
98142 * '@region'?: string|null,
99143 * }|StartSessionRequest $input
100144 */
@@ -108,6 +152,11 @@ public function getClientRequestToken(): ?string
108152 return $ this ->clientRequestToken ;
109153 }
110154
155+ public function getCopyWorkGroupTags (): ?bool
156+ {
157+ return $ this ->copyWorkGroupTags ;
158+ }
159+
111160 public function getDescription (): ?string
112161 {
113162 return $ this ->description ;
@@ -118,6 +167,16 @@ public function getEngineConfiguration(): ?EngineConfiguration
118167 return $ this ->engineConfiguration ;
119168 }
120169
170+ public function getExecutionRole (): ?string
171+ {
172+ return $ this ->executionRole ;
173+ }
174+
175+ public function getMonitoringConfiguration (): ?MonitoringConfiguration
176+ {
177+ return $ this ->monitoringConfiguration ;
178+ }
179+
121180 public function getNotebookVersion (): ?string
122181 {
123182 return $ this ->notebookVersion ;
@@ -128,6 +187,14 @@ public function getSessionIdleTimeoutInMinutes(): ?int
128187 return $ this ->sessionIdleTimeoutInMinutes ;
129188 }
130189
190+ /**
191+ * @return Tag[]
192+ */
193+ public function getTags (): array
194+ {
195+ return $ this ->tags ?? [];
196+ }
197+
131198 public function getWorkGroup (): ?string
132199 {
133200 return $ this ->workGroup ;
@@ -166,6 +233,13 @@ public function setClientRequestToken(?string $value): self
166233 return $ this ;
167234 }
168235
236+ public function setCopyWorkGroupTags (?bool $ value ): self
237+ {
238+ $ this ->copyWorkGroupTags = $ value ;
239+
240+ return $ this ;
241+ }
242+
169243 public function setDescription (?string $ value ): self
170244 {
171245 $ this ->description = $ value ;
@@ -180,6 +254,20 @@ public function setEngineConfiguration(?EngineConfiguration $value): self
180254 return $ this ;
181255 }
182256
257+ public function setExecutionRole (?string $ value ): self
258+ {
259+ $ this ->executionRole = $ value ;
260+
261+ return $ this ;
262+ }
263+
264+ public function setMonitoringConfiguration (?MonitoringConfiguration $ value ): self
265+ {
266+ $ this ->monitoringConfiguration = $ value ;
267+
268+ return $ this ;
269+ }
270+
183271 public function setNotebookVersion (?string $ value ): self
184272 {
185273 $ this ->notebookVersion = $ value ;
@@ -194,6 +282,16 @@ public function setSessionIdleTimeoutInMinutes(?int $value): self
194282 return $ this ;
195283 }
196284
285+ /**
286+ * @param Tag[] $value
287+ */
288+ public function setTags (array $ value ): self
289+ {
290+ $ this ->tags = $ value ;
291+
292+ return $ this ;
293+ }
294+
197295 public function setWorkGroup (?string $ value ): self
198296 {
199297 $ this ->workGroup = $ value ;
@@ -215,6 +313,12 @@ private function requestBody(): array
215313 throw new InvalidArgument (\sprintf ('Missing parameter "EngineConfiguration" for "%s". The value cannot be null. ' , __CLASS__ ));
216314 }
217315 $ payload ['EngineConfiguration ' ] = $ v ->requestBody ();
316+ if (null !== $ v = $ this ->executionRole ) {
317+ $ payload ['ExecutionRole ' ] = $ v ;
318+ }
319+ if (null !== $ v = $ this ->monitoringConfiguration ) {
320+ $ payload ['MonitoringConfiguration ' ] = $ v ->requestBody ();
321+ }
218322 if (null !== $ v = $ this ->notebookVersion ) {
219323 $ payload ['NotebookVersion ' ] = $ v ;
220324 }
@@ -224,6 +328,17 @@ private function requestBody(): array
224328 if (null !== $ v = $ this ->clientRequestToken ) {
225329 $ payload ['ClientRequestToken ' ] = $ v ;
226330 }
331+ if (null !== $ v = $ this ->tags ) {
332+ $ index = -1 ;
333+ $ payload ['Tags ' ] = [];
334+ foreach ($ v as $ listValue ) {
335+ ++$ index ;
336+ $ payload ['Tags ' ][$ index ] = $ listValue ->requestBody ();
337+ }
338+ }
339+ if (null !== $ v = $ this ->copyWorkGroupTags ) {
340+ $ payload ['CopyWorkGroupTags ' ] = (bool ) $ v ;
341+ }
227342
228343 return $ payload ;
229344 }
0 commit comments