1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::import_workspace_image::_import_workspace_image_input::ImportWorkspaceImageInputBuilder;
pub use crate::operation::import_workspace_image::_import_workspace_image_output::ImportWorkspaceImageOutputBuilder;
impl crate::operation::import_workspace_image::builders::ImportWorkspaceImageInputBuilder {
/// Sends a request with this input using the given client.
pub async fn send_with(
self,
client: &crate::Client,
) -> ::std::result::Result<
crate::operation::import_workspace_image::ImportWorkspaceImageOutput,
::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::import_workspace_image::ImportWorkspaceImageError,
::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
>,
> {
let mut fluent_builder = client.import_workspace_image();
fluent_builder.inner = self;
fluent_builder.send().await
}
}
/// Fluent builder constructing a request to `ImportWorkspaceImage`.
///
/// <p>Imports the specified Windows 10 or 11 Bring Your Own License (BYOL) image into Amazon WorkSpaces. The image must be an already licensed Amazon EC2 image that is in your Amazon Web Services account, and you must own the image. For more information about creating BYOL images, see <a href="https://docs.aws.amazon.com/workspaces/latest/adminguide/byol-windows-images.html"> Bring Your Own Windows Desktop Licenses</a>.</p>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct ImportWorkspaceImageFluentBuilder {
handle: ::std::sync::Arc<crate::client::Handle>,
inner: crate::operation::import_workspace_image::builders::ImportWorkspaceImageInputBuilder,
config_override: ::std::option::Option<crate::config::Builder>,
}
impl
crate::client::customize::internal::CustomizableSend<
crate::operation::import_workspace_image::ImportWorkspaceImageOutput,
crate::operation::import_workspace_image::ImportWorkspaceImageError,
> for ImportWorkspaceImageFluentBuilder
{
fn send(
self,
config_override: crate::config::Builder,
) -> crate::client::customize::internal::BoxFuture<
crate::client::customize::internal::SendResult<
crate::operation::import_workspace_image::ImportWorkspaceImageOutput,
crate::operation::import_workspace_image::ImportWorkspaceImageError,
>,
> {
::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
}
}
impl ImportWorkspaceImageFluentBuilder {
/// Creates a new `ImportWorkspaceImageFluentBuilder`.
pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
Self {
handle,
inner: ::std::default::Default::default(),
config_override: ::std::option::Option::None,
}
}
/// Access the ImportWorkspaceImage as a reference.
pub fn as_input(&self) -> &crate::operation::import_workspace_image::builders::ImportWorkspaceImageInputBuilder {
&self.inner
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> ::std::result::Result<
crate::operation::import_workspace_image::ImportWorkspaceImageOutput,
::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::import_workspace_image::ImportWorkspaceImageError,
::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
>,
> {
let input = self
.inner
.build()
.map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
let runtime_plugins = crate::operation::import_workspace_image::ImportWorkspaceImage::operation_runtime_plugins(
self.handle.runtime_plugins.clone(),
&self.handle.conf,
self.config_override,
);
crate::operation::import_workspace_image::ImportWorkspaceImage::orchestrate(&runtime_plugins, input).await
}
/// Consumes this builder, creating a customizable operation that can be modified before being sent.
pub fn customize(
self,
) -> crate::client::customize::CustomizableOperation<
crate::operation::import_workspace_image::ImportWorkspaceImageOutput,
crate::operation::import_workspace_image::ImportWorkspaceImageError,
Self,
> {
crate::client::customize::CustomizableOperation::new(self)
}
pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
self.set_config_override(::std::option::Option::Some(config_override.into()));
self
}
pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
self.config_override = config_override;
self
}
/// <p>The identifier of the EC2 image.</p>
pub fn ec2_image_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.inner = self.inner.ec2_image_id(input.into());
self
}
/// <p>The identifier of the EC2 image.</p>
pub fn set_ec2_image_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.inner = self.inner.set_ec2_image_id(input);
self
}
/// <p>The identifier of the EC2 image.</p>
pub fn get_ec2_image_id(&self) -> &::std::option::Option<::std::string::String> {
self.inner.get_ec2_image_id()
}
/// <p>The ingestion process to be used when importing the image, depending on which protocol you want to use for your BYOL Workspace image, either PCoIP, WSP, or bring your own protocol (BYOP). To use DCV, specify a value that ends in <code>_WSP</code>. To use PCoIP, specify a value that does not end in <code>_WSP</code>. To use BYOP, specify a value that ends in <code>_BYOP</code>.</p>
/// <p>For non-GPU-enabled bundles (bundles other than Graphics or GraphicsPro), specify <code>BYOL_REGULAR</code>, <code>BYOL_REGULAR_WSP</code>, or <code>BYOL_REGULAR_BYOP</code>, depending on the protocol.</p><note>
/// <p>The <code>BYOL_REGULAR_BYOP</code> and <code>BYOL_GRAPHICS_G4DN_BYOP</code> values are only supported by Amazon WorkSpaces Core. Contact your account team to be allow-listed to use these values. For more information, see <a href="http://aws.amazon.com/workspaces/core/">Amazon WorkSpaces Core</a>.</p>
/// </note>
pub fn ingestion_process(mut self, input: crate::types::WorkspaceImageIngestionProcess) -> Self {
self.inner = self.inner.ingestion_process(input);
self
}
/// <p>The ingestion process to be used when importing the image, depending on which protocol you want to use for your BYOL Workspace image, either PCoIP, WSP, or bring your own protocol (BYOP). To use DCV, specify a value that ends in <code>_WSP</code>. To use PCoIP, specify a value that does not end in <code>_WSP</code>. To use BYOP, specify a value that ends in <code>_BYOP</code>.</p>
/// <p>For non-GPU-enabled bundles (bundles other than Graphics or GraphicsPro), specify <code>BYOL_REGULAR</code>, <code>BYOL_REGULAR_WSP</code>, or <code>BYOL_REGULAR_BYOP</code>, depending on the protocol.</p><note>
/// <p>The <code>BYOL_REGULAR_BYOP</code> and <code>BYOL_GRAPHICS_G4DN_BYOP</code> values are only supported by Amazon WorkSpaces Core. Contact your account team to be allow-listed to use these values. For more information, see <a href="http://aws.amazon.com/workspaces/core/">Amazon WorkSpaces Core</a>.</p>
/// </note>
pub fn set_ingestion_process(mut self, input: ::std::option::Option<crate::types::WorkspaceImageIngestionProcess>) -> Self {
self.inner = self.inner.set_ingestion_process(input);
self
}
/// <p>The ingestion process to be used when importing the image, depending on which protocol you want to use for your BYOL Workspace image, either PCoIP, WSP, or bring your own protocol (BYOP). To use DCV, specify a value that ends in <code>_WSP</code>. To use PCoIP, specify a value that does not end in <code>_WSP</code>. To use BYOP, specify a value that ends in <code>_BYOP</code>.</p>
/// <p>For non-GPU-enabled bundles (bundles other than Graphics or GraphicsPro), specify <code>BYOL_REGULAR</code>, <code>BYOL_REGULAR_WSP</code>, or <code>BYOL_REGULAR_BYOP</code>, depending on the protocol.</p><note>
/// <p>The <code>BYOL_REGULAR_BYOP</code> and <code>BYOL_GRAPHICS_G4DN_BYOP</code> values are only supported by Amazon WorkSpaces Core. Contact your account team to be allow-listed to use these values. For more information, see <a href="http://aws.amazon.com/workspaces/core/">Amazon WorkSpaces Core</a>.</p>
/// </note>
pub fn get_ingestion_process(&self) -> &::std::option::Option<crate::types::WorkspaceImageIngestionProcess> {
self.inner.get_ingestion_process()
}
/// <p>The name of the WorkSpace image.</p>
pub fn image_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.inner = self.inner.image_name(input.into());
self
}
/// <p>The name of the WorkSpace image.</p>
pub fn set_image_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.inner = self.inner.set_image_name(input);
self
}
/// <p>The name of the WorkSpace image.</p>
pub fn get_image_name(&self) -> &::std::option::Option<::std::string::String> {
self.inner.get_image_name()
}
/// <p>The description of the WorkSpace image.</p>
pub fn image_description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.inner = self.inner.image_description(input.into());
self
}
/// <p>The description of the WorkSpace image.</p>
pub fn set_image_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.inner = self.inner.set_image_description(input);
self
}
/// <p>The description of the WorkSpace image.</p>
pub fn get_image_description(&self) -> &::std::option::Option<::std::string::String> {
self.inner.get_image_description()
}
///
/// Appends an item to `Tags`.
///
/// To override the contents of this collection use [`set_tags`](Self::set_tags).
///
/// <p>The tags. Each WorkSpaces resource can have a maximum of 50 tags.</p>
pub fn tags(mut self, input: crate::types::Tag) -> Self {
self.inner = self.inner.tags(input);
self
}
/// <p>The tags. Each WorkSpaces resource can have a maximum of 50 tags.</p>
pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
self.inner = self.inner.set_tags(input);
self
}
/// <p>The tags. Each WorkSpaces resource can have a maximum of 50 tags.</p>
pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
self.inner.get_tags()
}
///
/// Appends an item to `Applications`.
///
/// To override the contents of this collection use [`set_applications`](Self::set_applications).
///
/// <p>If specified, the version of Microsoft Office to subscribe to. Valid only for Windows 10 and 11 BYOL images. For more information about subscribing to Office for BYOL images, see <a href="https://docs.aws.amazon.com/workspaces/latest/adminguide/byol-windows-images.html"> Bring Your Own Windows Desktop Licenses</a>.</p><note>
/// <ul>
/// <li>
/// <p>Although this parameter is an array, only one item is allowed at this time.</p></li>
/// <li>
/// <p>During the image import process, non-GPU DCV (formerly WSP) WorkSpaces with Windows 11 support only <code>Microsoft_Office_2019</code>. GPU DCV (formerly WSP) WorkSpaces with Windows 11 do not support Office installation.</p></li>
/// </ul>
/// </note>
pub fn applications(mut self, input: crate::types::Application) -> Self {
self.inner = self.inner.applications(input);
self
}
/// <p>If specified, the version of Microsoft Office to subscribe to. Valid only for Windows 10 and 11 BYOL images. For more information about subscribing to Office for BYOL images, see <a href="https://docs.aws.amazon.com/workspaces/latest/adminguide/byol-windows-images.html"> Bring Your Own Windows Desktop Licenses</a>.</p><note>
/// <ul>
/// <li>
/// <p>Although this parameter is an array, only one item is allowed at this time.</p></li>
/// <li>
/// <p>During the image import process, non-GPU DCV (formerly WSP) WorkSpaces with Windows 11 support only <code>Microsoft_Office_2019</code>. GPU DCV (formerly WSP) WorkSpaces with Windows 11 do not support Office installation.</p></li>
/// </ul>
/// </note>
pub fn set_applications(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Application>>) -> Self {
self.inner = self.inner.set_applications(input);
self
}
/// <p>If specified, the version of Microsoft Office to subscribe to. Valid only for Windows 10 and 11 BYOL images. For more information about subscribing to Office for BYOL images, see <a href="https://docs.aws.amazon.com/workspaces/latest/adminguide/byol-windows-images.html"> Bring Your Own Windows Desktop Licenses</a>.</p><note>
/// <ul>
/// <li>
/// <p>Although this parameter is an array, only one item is allowed at this time.</p></li>
/// <li>
/// <p>During the image import process, non-GPU DCV (formerly WSP) WorkSpaces with Windows 11 support only <code>Microsoft_Office_2019</code>. GPU DCV (formerly WSP) WorkSpaces with Windows 11 do not support Office installation.</p></li>
/// </ul>
/// </note>
pub fn get_applications(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Application>> {
self.inner.get_applications()
}
}