1 + | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 + |
|
3 + | /// <p>The data type name for including resource data sync state. There are four sync states:</p>
|
4 + | /// <p><code>OrganizationNotExists</code> (Your organization doesn't exist)</p>
|
5 + | /// <p><code>NoPermissions</code> (The system can't locate the service-linked role. This role is automatically created when a user creates a resource data sync in Amazon Web Services Systems Manager Explorer.)</p>
|
6 + | /// <p><code>InvalidOrganizationalUnit</code> (You specified or selected an invalid unit in the resource data sync configuration.)</p>
|
7 + | /// <p><code>TrustedAccessDisabled</code> (You disabled Systems Manager access in the organization in Organizations.)</p>
|
8 + | #[non_exhaustive]
|
9 + | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
10 + | pub struct ResourceDataSyncSourceWithState {
|
11 + | /// <p>The type of data source for the resource data sync. <code>SourceType</code> is either <code>AwsOrganizations</code> (if an organization is present in Organizations) or <code>singleAccountMultiRegions</code>.</p>
|
12 + | pub source_type: ::std::option::Option<::std::string::String>,
|
13 + | /// <p>The field name in <code>SyncSource</code> for the <code>ResourceDataSyncAwsOrganizationsSource</code> type.</p>
|
14 + | pub aws_organizations_source: ::std::option::Option<crate::types::ResourceDataSyncAwsOrganizationsSource>,
|
15 + | /// <p>The <code>SyncSource</code> Amazon Web Services Regions included in the resource data sync.</p>
|
16 + | pub source_regions: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
|
17 + | /// <p>Whether to automatically synchronize and aggregate data from new Amazon Web Services Regions when those Regions come online.</p>
|
18 + | pub include_future_regions: bool,
|
19 + | /// <p>The data type name for including resource data sync state. There are four sync states:</p>
|
20 + | /// <p><code>OrganizationNotExists</code>: Your organization doesn't exist.</p>
|
21 + | /// <p><code>NoPermissions</code>: The system can't locate the service-linked role. This role is automatically created when a user creates a resource data sync in Explorer.</p>
|
22 + | /// <p><code>InvalidOrganizationalUnit</code>: You specified or selected an invalid unit in the resource data sync configuration.</p>
|
23 + | /// <p><code>TrustedAccessDisabled</code>: You disabled Systems Manager access in the organization in Organizations.</p>
|
24 + | pub state: ::std::option::Option<::std::string::String>,
|
25 + | /// <p>When you create a resource data sync, if you choose one of the Organizations options, then Systems Manager automatically enables all OpsData sources in the selected Amazon Web Services Regions for all Amazon Web Services accounts in your organization (or in the selected organization units). For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/Explorer-resource-data-sync.html">Setting up Systems Manager Explorer to display data from multiple accounts and Regions</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
|
26 + | pub enable_all_ops_data_sources: bool,
|
27 + | }
|
28 + | impl ResourceDataSyncSourceWithState {
|
29 + | /// <p>The type of data source for the resource data sync. <code>SourceType</code> is either <code>AwsOrganizations</code> (if an organization is present in Organizations) or <code>singleAccountMultiRegions</code>.</p>
|
30 + | pub fn source_type(&self) -> ::std::option::Option<&str> {
|
31 + | self.source_type.as_deref()
|
32 + | }
|
33 + | /// <p>The field name in <code>SyncSource</code> for the <code>ResourceDataSyncAwsOrganizationsSource</code> type.</p>
|
34 + | pub fn aws_organizations_source(&self) -> ::std::option::Option<&crate::types::ResourceDataSyncAwsOrganizationsSource> {
|
35 + | self.aws_organizations_source.as_ref()
|
36 + | }
|
37 + | /// <p>The <code>SyncSource</code> Amazon Web Services Regions included in the resource data sync.</p>
|
38 + | ///
|
39 + | /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.source_regions.is_none()`.
|
40 + | pub fn source_regions(&self) -> &[::std::string::String] {
|
41 + | self.source_regions.as_deref().unwrap_or_default()
|
42 + | }
|
43 + | /// <p>Whether to automatically synchronize and aggregate data from new Amazon Web Services Regions when those Regions come online.</p>
|
44 + | pub fn include_future_regions(&self) -> bool {
|
45 + | self.include_future_regions
|
46 + | }
|
47 + | /// <p>The data type name for including resource data sync state. There are four sync states:</p>
|
48 + | /// <p><code>OrganizationNotExists</code>: Your organization doesn't exist.</p>
|
49 + | /// <p><code>NoPermissions</code>: The system can't locate the service-linked role. This role is automatically created when a user creates a resource data sync in Explorer.</p>
|
50 + | /// <p><code>InvalidOrganizationalUnit</code>: You specified or selected an invalid unit in the resource data sync configuration.</p>
|
51 + | /// <p><code>TrustedAccessDisabled</code>: You disabled Systems Manager access in the organization in Organizations.</p>
|
52 + | pub fn state(&self) -> ::std::option::Option<&str> {
|
53 + | self.state.as_deref()
|
54 + | }
|
55 + | /// <p>When you create a resource data sync, if you choose one of the Organizations options, then Systems Manager automatically enables all OpsData sources in the selected Amazon Web Services Regions for all Amazon Web Services accounts in your organization (or in the selected organization units). For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/Explorer-resource-data-sync.html">Setting up Systems Manager Explorer to display data from multiple accounts and Regions</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
|
56 + | pub fn enable_all_ops_data_sources(&self) -> bool {
|
57 + | self.enable_all_ops_data_sources
|
58 + | }
|
59 + | }
|
60 + | static RESOURCEDATASYNCSOURCEWITHSTATE_MEMBER_SOURCE_TYPE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
61 + | ::aws_smithy_schema::ShapeId::from_parts(
|
62 + | "com.amazonaws.ssm#ResourceDataSyncSourceWithState$SourceType",
|
63 + | "com.amazonaws.ssm",
|
64 + | "ResourceDataSyncSourceWithState",
|
65 + | ),
|
66 + | ::aws_smithy_schema::ShapeType::String,
|
67 + | "SourceType",
|
68 + | 0,
|
69 + | );
|
70 + | static RESOURCEDATASYNCSOURCEWITHSTATE_MEMBER_AWS_ORGANIZATIONS_SOURCE: ::aws_smithy_schema::Schema<'static> =
|
71 + | ::aws_smithy_schema::Schema::new_member(
|
72 + | ::aws_smithy_schema::ShapeId::from_parts(
|
73 + | "com.amazonaws.ssm#ResourceDataSyncSourceWithState$AwsOrganizationsSource",
|
74 + | "com.amazonaws.ssm",
|
75 + | "ResourceDataSyncSourceWithState",
|
76 + | ),
|
77 + | ::aws_smithy_schema::ShapeType::Structure,
|
78 + | "AwsOrganizationsSource",
|
79 + | 1,
|
80 + | );
|
81 + | static RESOURCEDATASYNCSOURCEWITHSTATE_MEMBER_SOURCE_REGIONS_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
82 + | ::aws_smithy_schema::ShapeId::from_parts(
|
83 + | "com.amazonaws.ssm#ResourceDataSyncSourceRegionList$member",
|
84 + | "com.amazonaws.ssm",
|
85 + | "ResourceDataSyncSourceRegionList",
|
86 + | ),
|
87 + | ::aws_smithy_schema::ShapeType::String,
|
88 + | "member",
|
89 + | 0,
|
90 + | );
|
91 + | static RESOURCEDATASYNCSOURCEWITHSTATE_MEMBER_SOURCE_REGIONS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
92 + | ::aws_smithy_schema::ShapeId::from_parts(
|
93 + | "com.amazonaws.ssm#ResourceDataSyncSourceWithState$SourceRegions",
|
94 + | "com.amazonaws.ssm",
|
95 + | "ResourceDataSyncSourceWithState",
|
96 + | ),
|
97 + | ::aws_smithy_schema::ShapeType::List,
|
98 + | "SourceRegions",
|
99 + | 2,
|
100 + | )
|
101 + | .with_list_member(&RESOURCEDATASYNCSOURCEWITHSTATE_MEMBER_SOURCE_REGIONS_MEMBER);
|
102 + | static RESOURCEDATASYNCSOURCEWITHSTATE_MEMBER_INCLUDE_FUTURE_REGIONS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
103 + | ::aws_smithy_schema::ShapeId::from_parts(
|
104 + | "com.amazonaws.ssm#ResourceDataSyncSourceWithState$IncludeFutureRegions",
|
105 + | "com.amazonaws.ssm",
|
106 + | "ResourceDataSyncSourceWithState",
|
107 + | ),
|
108 + | ::aws_smithy_schema::ShapeType::Boolean,
|
109 + | "IncludeFutureRegions",
|
110 + | 3,
|
111 + | );
|
112 + | static RESOURCEDATASYNCSOURCEWITHSTATE_MEMBER_STATE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
113 + | ::aws_smithy_schema::ShapeId::from_parts(
|
114 + | "com.amazonaws.ssm#ResourceDataSyncSourceWithState$State",
|
115 + | "com.amazonaws.ssm",
|
116 + | "ResourceDataSyncSourceWithState",
|
117 + | ),
|
118 + | ::aws_smithy_schema::ShapeType::String,
|
119 + | "State",
|
120 + | 4,
|
121 + | );
|
122 + | static RESOURCEDATASYNCSOURCEWITHSTATE_MEMBER_ENABLE_ALL_OPS_DATA_SOURCES: ::aws_smithy_schema::Schema<'static> =
|
123 + | ::aws_smithy_schema::Schema::new_member(
|
124 + | ::aws_smithy_schema::ShapeId::from_parts(
|
125 + | "com.amazonaws.ssm#ResourceDataSyncSourceWithState$EnableAllOpsDataSources",
|
126 + | "com.amazonaws.ssm",
|
127 + | "ResourceDataSyncSourceWithState",
|
128 + | ),
|
129 + | ::aws_smithy_schema::ShapeType::Boolean,
|
130 + | "EnableAllOpsDataSources",
|
131 + | 5,
|
132 + | );
|
133 + | static RESOURCEDATASYNCSOURCEWITHSTATE_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
|
134 + | ::aws_smithy_schema::ShapeId::from_parts(
|
135 + | "com.amazonaws.ssm#ResourceDataSyncSourceWithState",
|
136 + | "com.amazonaws.ssm",
|
137 + | "ResourceDataSyncSourceWithState",
|
138 + | ),
|
139 + | ::aws_smithy_schema::ShapeType::Structure,
|
140 + | &[
|
141 + | &RESOURCEDATASYNCSOURCEWITHSTATE_MEMBER_SOURCE_TYPE,
|
142 + | &RESOURCEDATASYNCSOURCEWITHSTATE_MEMBER_AWS_ORGANIZATIONS_SOURCE,
|
143 + | &RESOURCEDATASYNCSOURCEWITHSTATE_MEMBER_SOURCE_REGIONS,
|
144 + | &RESOURCEDATASYNCSOURCEWITHSTATE_MEMBER_INCLUDE_FUTURE_REGIONS,
|
145 + | &RESOURCEDATASYNCSOURCEWITHSTATE_MEMBER_STATE,
|
146 + | &RESOURCEDATASYNCSOURCEWITHSTATE_MEMBER_ENABLE_ALL_OPS_DATA_SOURCES,
|
147 + | ],
|
148 + | );
|
149 + | impl ResourceDataSyncSourceWithState {
|
150 + | /// The schema for this shape.
|
151 + | pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &RESOURCEDATASYNCSOURCEWITHSTATE_SCHEMA;
|
152 + | }
|
153 + | impl ::aws_smithy_schema::serde::SerializableStruct for ResourceDataSyncSourceWithState {
|
154 + | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
155 + | fn serialize_members(
|
156 + | &self,
|
157 + | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
158 + | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
159 + | if let Some(ref val) = self.source_type {
|
160 + | ser.write_string(&RESOURCEDATASYNCSOURCEWITHSTATE_MEMBER_SOURCE_TYPE, val)?;
|
161 + | }
|
162 + | if let Some(ref val) = self.aws_organizations_source {
|
163 + | ser.write_struct(&RESOURCEDATASYNCSOURCEWITHSTATE_MEMBER_AWS_ORGANIZATIONS_SOURCE, val)?;
|
164 + | }
|
165 + | if let Some(ref val) = self.source_regions {
|
166 + | ser.write_list(
|
167 + | &RESOURCEDATASYNCSOURCEWITHSTATE_MEMBER_SOURCE_REGIONS,
|
168 + | &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
|
169 + | for item in val {
|
170 + | ser.write_string(&aws_smithy_schema::prelude::STRING, item)?;
|
171 + | }
|
172 + | Ok(())
|
173 + | },
|
174 + | )?;
|
175 + | }
|
176 + | {
|
177 + | let val = &self.include_future_regions;
|
178 + | ser.write_boolean(&RESOURCEDATASYNCSOURCEWITHSTATE_MEMBER_INCLUDE_FUTURE_REGIONS, *val)?;
|
179 + | }
|
180 + | if let Some(ref val) = self.state {
|
181 + | ser.write_string(&RESOURCEDATASYNCSOURCEWITHSTATE_MEMBER_STATE, val)?;
|
182 + | }
|
183 + | {
|
184 + | let val = &self.enable_all_ops_data_sources;
|
185 + | ser.write_boolean(&RESOURCEDATASYNCSOURCEWITHSTATE_MEMBER_ENABLE_ALL_OPS_DATA_SOURCES, *val)?;
|
186 + | }
|
187 + | Ok(())
|
188 + | }
|
189 + | }
|
190 + | impl ResourceDataSyncSourceWithState {
|
191 + | /// Deserializes this structure from a [`ShapeDeserializer`].
|
192 + | pub fn deserialize(
|
193 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
194 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
195 + | #[allow(unused_variables, unused_mut)]
|
196 + | let mut builder = Self::builder();
|
197 + | #[allow(
|
198 + | unused_variables,
|
199 + | unreachable_code,
|
200 + | clippy::single_match,
|
201 + | clippy::match_single_binding,
|
202 + | clippy::diverging_sub_expression
|
203 + | )]
|
204 + | deserializer.read_struct(&RESOURCEDATASYNCSOURCEWITHSTATE_SCHEMA, &mut |member, deser| {
|
205 + | match member.member_index() {
|
206 + | Some(0) => {
|
207 + | if deser.is_null() {
|
208 + | deser.read_null()?;
|
209 + | } else {
|
210 + | builder.source_type = Some(deser.read_string(member)?);
|
211 + | }
|
212 + | }
|
213 + | Some(1) => {
|
214 + | if deser.is_null() {
|
215 + | deser.read_null()?;
|
216 + | } else {
|
217 + | builder.aws_organizations_source = Some(crate::types::ResourceDataSyncAwsOrganizationsSource::deserialize(deser)?);
|
218 + | }
|
219 + | }
|
220 + | Some(2) => {
|
221 + | if deser.is_null() {
|
222 + | deser.read_null()?;
|
223 + | } else {
|
224 + | builder.source_regions = Some(deser.read_string_list(member)?);
|
225 + | }
|
226 + | }
|
227 + | Some(3) => {
|
228 + | builder.include_future_regions = Some(deser.read_boolean(member)?);
|
229 + | }
|
230 + | Some(4) => {
|
231 + | if deser.is_null() {
|
232 + | deser.read_null()?;
|
233 + | } else {
|
234 + | builder.state = Some(deser.read_string(member)?);
|
235 + | }
|
236 + | }
|
237 + | Some(5) => {
|
238 + | builder.enable_all_ops_data_sources = Some(deser.read_boolean(member)?);
|
239 + | }
|
240 + | _ => {}
|
241 + | }
|
242 + | Ok(())
|
243 + | })?;
|
244 + | Ok(builder.build())
|
245 + | }
|
246 + | }
|
247 + | impl ResourceDataSyncSourceWithState {
|
248 + | /// Deserializes this structure from a body deserializer and HTTP response.
|
249 + | pub fn deserialize_with_response(
|
250 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
251 + | _headers: &::aws_smithy_runtime_api::http::Headers,
|
252 + | _status: u16,
|
253 + | _body: &[u8],
|
254 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
255 + | Self::deserialize(deserializer)
|
256 + | }
|
257 + | }
|
258 + | impl ResourceDataSyncSourceWithState {
|
259 + | /// Creates a new builder-style object to manufacture [`ResourceDataSyncSourceWithState`](crate::types::ResourceDataSyncSourceWithState).
|
260 + | pub fn builder() -> crate::types::builders::ResourceDataSyncSourceWithStateBuilder {
|
261 + | crate::types::builders::ResourceDataSyncSourceWithStateBuilder::default()
|
262 + | }
|
263 + | }
|
264 + |
|
265 + | /// A builder for [`ResourceDataSyncSourceWithState`](crate::types::ResourceDataSyncSourceWithState).
|
266 + | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
|
267 + | #[non_exhaustive]
|
268 + | pub struct ResourceDataSyncSourceWithStateBuilder {
|
269 + | pub(crate) source_type: ::std::option::Option<::std::string::String>,
|
270 + | pub(crate) aws_organizations_source: ::std::option::Option<crate::types::ResourceDataSyncAwsOrganizationsSource>,
|
271 + | pub(crate) source_regions: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
|
272 + | pub(crate) include_future_regions: ::std::option::Option<bool>,
|
273 + | pub(crate) state: ::std::option::Option<::std::string::String>,
|
274 + | pub(crate) enable_all_ops_data_sources: ::std::option::Option<bool>,
|
275 + | }
|
276 + | impl ResourceDataSyncSourceWithStateBuilder {
|
277 + | /// <p>The type of data source for the resource data sync. <code>SourceType</code> is either <code>AwsOrganizations</code> (if an organization is present in Organizations) or <code>singleAccountMultiRegions</code>.</p>
|
278 + | pub fn source_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
279 + | self.source_type = ::std::option::Option::Some(input.into());
|
280 + | self
|
281 + | }
|
282 + | /// <p>The type of data source for the resource data sync. <code>SourceType</code> is either <code>AwsOrganizations</code> (if an organization is present in Organizations) or <code>singleAccountMultiRegions</code>.</p>
|
283 + | pub fn set_source_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
284 + | self.source_type = input;
|
285 + | self
|
286 + | }
|
287 + | /// <p>The type of data source for the resource data sync. <code>SourceType</code> is either <code>AwsOrganizations</code> (if an organization is present in Organizations) or <code>singleAccountMultiRegions</code>.</p>
|
288 + | pub fn get_source_type(&self) -> &::std::option::Option<::std::string::String> {
|
289 + | &self.source_type
|
290 + | }
|
291 + | /// <p>The field name in <code>SyncSource</code> for the <code>ResourceDataSyncAwsOrganizationsSource</code> type.</p>
|
292 + | pub fn aws_organizations_source(mut self, input: crate::types::ResourceDataSyncAwsOrganizationsSource) -> Self {
|
293 + | self.aws_organizations_source = ::std::option::Option::Some(input);
|
294 + | self
|
295 + | }
|
296 + | /// <p>The field name in <code>SyncSource</code> for the <code>ResourceDataSyncAwsOrganizationsSource</code> type.</p>
|
297 + | pub fn set_aws_organizations_source(mut self, input: ::std::option::Option<crate::types::ResourceDataSyncAwsOrganizationsSource>) -> Self {
|
298 + | self.aws_organizations_source = input;
|
299 + | self
|
300 + | }
|
301 + | /// <p>The field name in <code>SyncSource</code> for the <code>ResourceDataSyncAwsOrganizationsSource</code> type.</p>
|
302 + | pub fn get_aws_organizations_source(&self) -> &::std::option::Option<crate::types::ResourceDataSyncAwsOrganizationsSource> {
|
303 + | &self.aws_organizations_source
|
304 + | }
|
305 + | /// Appends an item to `source_regions`.
|
306 + | ///
|
307 + | /// To override the contents of this collection use [`set_source_regions`](Self::set_source_regions).
|
308 + | ///
|
309 + | /// <p>The <code>SyncSource</code> Amazon Web Services Regions included in the resource data sync.</p>
|
310 + | pub fn source_regions(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
311 + | let mut v = self.source_regions.unwrap_or_default();
|
312 + | v.push(input.into());
|
313 + | self.source_regions = ::std::option::Option::Some(v);
|
314 + | self
|
315 + | }
|
316 + | /// <p>The <code>SyncSource</code> Amazon Web Services Regions included in the resource data sync.</p>
|
317 + | pub fn set_source_regions(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
|
318 + | self.source_regions = input;
|
319 + | self
|
320 + | }
|
321 + | /// <p>The <code>SyncSource</code> Amazon Web Services Regions included in the resource data sync.</p>
|
322 + | pub fn get_source_regions(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
|
323 + | &self.source_regions
|
324 + | }
|
325 + | /// <p>Whether to automatically synchronize and aggregate data from new Amazon Web Services Regions when those Regions come online.</p>
|
326 + | pub fn include_future_regions(mut self, input: bool) -> Self {
|
327 + | self.include_future_regions = ::std::option::Option::Some(input);
|
328 + | self
|
329 + | }
|
330 + | /// <p>Whether to automatically synchronize and aggregate data from new Amazon Web Services Regions when those Regions come online.</p>
|
331 + | pub fn set_include_future_regions(mut self, input: ::std::option::Option<bool>) -> Self {
|
332 + | self.include_future_regions = input;
|
333 + | self
|
334 + | }
|
335 + | /// <p>Whether to automatically synchronize and aggregate data from new Amazon Web Services Regions when those Regions come online.</p>
|
336 + | pub fn get_include_future_regions(&self) -> &::std::option::Option<bool> {
|
337 + | &self.include_future_regions
|
338 + | }
|
339 + | /// <p>The data type name for including resource data sync state. There are four sync states:</p>
|
340 + | /// <p><code>OrganizationNotExists</code>: Your organization doesn't exist.</p>
|
341 + | /// <p><code>NoPermissions</code>: The system can't locate the service-linked role. This role is automatically created when a user creates a resource data sync in Explorer.</p>
|
342 + | /// <p><code>InvalidOrganizationalUnit</code>: You specified or selected an invalid unit in the resource data sync configuration.</p>
|
343 + | /// <p><code>TrustedAccessDisabled</code>: You disabled Systems Manager access in the organization in Organizations.</p>
|
344 + | pub fn state(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
345 + | self.state = ::std::option::Option::Some(input.into());
|
346 + | self
|
347 + | }
|
348 + | /// <p>The data type name for including resource data sync state. There are four sync states:</p>
|
349 + | /// <p><code>OrganizationNotExists</code>: Your organization doesn't exist.</p>
|
350 + | /// <p><code>NoPermissions</code>: The system can't locate the service-linked role. This role is automatically created when a user creates a resource data sync in Explorer.</p>
|
351 + | /// <p><code>InvalidOrganizationalUnit</code>: You specified or selected an invalid unit in the resource data sync configuration.</p>
|
352 + | /// <p><code>TrustedAccessDisabled</code>: You disabled Systems Manager access in the organization in Organizations.</p>
|
353 + | pub fn set_state(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
354 + | self.state = input;
|
355 + | self
|
356 + | }
|
357 + | /// <p>The data type name for including resource data sync state. There are four sync states:</p>
|
358 + | /// <p><code>OrganizationNotExists</code>: Your organization doesn't exist.</p>
|
359 + | /// <p><code>NoPermissions</code>: The system can't locate the service-linked role. This role is automatically created when a user creates a resource data sync in Explorer.</p>
|
360 + | /// <p><code>InvalidOrganizationalUnit</code>: You specified or selected an invalid unit in the resource data sync configuration.</p>
|
361 + | /// <p><code>TrustedAccessDisabled</code>: You disabled Systems Manager access in the organization in Organizations.</p>
|
362 + | pub fn get_state(&self) -> &::std::option::Option<::std::string::String> {
|
363 + | &self.state
|
364 + | }
|
365 + | /// <p>When you create a resource data sync, if you choose one of the Organizations options, then Systems Manager automatically enables all OpsData sources in the selected Amazon Web Services Regions for all Amazon Web Services accounts in your organization (or in the selected organization units). For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/Explorer-resource-data-sync.html">Setting up Systems Manager Explorer to display data from multiple accounts and Regions</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
|
366 + | pub fn enable_all_ops_data_sources(mut self, input: bool) -> Self {
|
367 + | self.enable_all_ops_data_sources = ::std::option::Option::Some(input);
|
368 + | self
|
369 + | }
|
370 + | /// <p>When you create a resource data sync, if you choose one of the Organizations options, then Systems Manager automatically enables all OpsData sources in the selected Amazon Web Services Regions for all Amazon Web Services accounts in your organization (or in the selected organization units). For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/Explorer-resource-data-sync.html">Setting up Systems Manager Explorer to display data from multiple accounts and Regions</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
|
371 + | pub fn set_enable_all_ops_data_sources(mut self, input: ::std::option::Option<bool>) -> Self {
|
372 + | self.enable_all_ops_data_sources = input;
|
373 + | self
|
374 + | }
|
375 + | /// <p>When you create a resource data sync, if you choose one of the Organizations options, then Systems Manager automatically enables all OpsData sources in the selected Amazon Web Services Regions for all Amazon Web Services accounts in your organization (or in the selected organization units). For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/Explorer-resource-data-sync.html">Setting up Systems Manager Explorer to display data from multiple accounts and Regions</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
|
376 + | pub fn get_enable_all_ops_data_sources(&self) -> &::std::option::Option<bool> {
|
377 + | &self.enable_all_ops_data_sources
|
378 + | }
|
379 + | /// Consumes the builder and constructs a [`ResourceDataSyncSourceWithState`](crate::types::ResourceDataSyncSourceWithState).
|
380 + | pub fn build(self) -> crate::types::ResourceDataSyncSourceWithState {
|
381 + | crate::types::ResourceDataSyncSourceWithState {
|
382 + | source_type: self.source_type,
|
383 + | aws_organizations_source: self.aws_organizations_source,
|
384 + | source_regions: self.source_regions,
|
385 + | include_future_regions: self.include_future_regions.unwrap_or_default(),
|
386 + | state: self.state,
|
387 + | enable_all_ops_data_sources: self.enable_all_ops_data_sources.unwrap_or_default(),
|
388 + | }
|
389 + | }
|
390 + | }
|