aws_sdk_cloudtrail/operation/enable_federation/
_enable_federation_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct EnableFederationInput {
6    /// <p>The ARN (or ID suffix of the ARN) of the event data store for which you want to enable Lake query federation.</p>
7    pub event_data_store: ::std::option::Option<::std::string::String>,
8    /// <p>The ARN of the federation role to use for the event data store. Amazon Web Services services like Lake Formation use this federation role to access data for the federated event data store. The federation role must exist in your account and provide the <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-federation.html#query-federation-permissions-role">required minimum permissions</a>.</p>
9    pub federation_role_arn: ::std::option::Option<::std::string::String>,
10}
11impl EnableFederationInput {
12    /// <p>The ARN (or ID suffix of the ARN) of the event data store for which you want to enable Lake query federation.</p>
13    pub fn event_data_store(&self) -> ::std::option::Option<&str> {
14        self.event_data_store.as_deref()
15    }
16    /// <p>The ARN of the federation role to use for the event data store. Amazon Web Services services like Lake Formation use this federation role to access data for the federated event data store. The federation role must exist in your account and provide the <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-federation.html#query-federation-permissions-role">required minimum permissions</a>.</p>
17    pub fn federation_role_arn(&self) -> ::std::option::Option<&str> {
18        self.federation_role_arn.as_deref()
19    }
20}
21impl EnableFederationInput {
22    /// Creates a new builder-style object to manufacture [`EnableFederationInput`](crate::operation::enable_federation::EnableFederationInput).
23    pub fn builder() -> crate::operation::enable_federation::builders::EnableFederationInputBuilder {
24        crate::operation::enable_federation::builders::EnableFederationInputBuilder::default()
25    }
26}
27
28/// A builder for [`EnableFederationInput`](crate::operation::enable_federation::EnableFederationInput).
29#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
30#[non_exhaustive]
31pub struct EnableFederationInputBuilder {
32    pub(crate) event_data_store: ::std::option::Option<::std::string::String>,
33    pub(crate) federation_role_arn: ::std::option::Option<::std::string::String>,
34}
35impl EnableFederationInputBuilder {
36    /// <p>The ARN (or ID suffix of the ARN) of the event data store for which you want to enable Lake query federation.</p>
37    /// This field is required.
38    pub fn event_data_store(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
39        self.event_data_store = ::std::option::Option::Some(input.into());
40        self
41    }
42    /// <p>The ARN (or ID suffix of the ARN) of the event data store for which you want to enable Lake query federation.</p>
43    pub fn set_event_data_store(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
44        self.event_data_store = input;
45        self
46    }
47    /// <p>The ARN (or ID suffix of the ARN) of the event data store for which you want to enable Lake query federation.</p>
48    pub fn get_event_data_store(&self) -> &::std::option::Option<::std::string::String> {
49        &self.event_data_store
50    }
51    /// <p>The ARN of the federation role to use for the event data store. Amazon Web Services services like Lake Formation use this federation role to access data for the federated event data store. The federation role must exist in your account and provide the <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-federation.html#query-federation-permissions-role">required minimum permissions</a>.</p>
52    /// This field is required.
53    pub fn federation_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
54        self.federation_role_arn = ::std::option::Option::Some(input.into());
55        self
56    }
57    /// <p>The ARN of the federation role to use for the event data store. Amazon Web Services services like Lake Formation use this federation role to access data for the federated event data store. The federation role must exist in your account and provide the <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-federation.html#query-federation-permissions-role">required minimum permissions</a>.</p>
58    pub fn set_federation_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
59        self.federation_role_arn = input;
60        self
61    }
62    /// <p>The ARN of the federation role to use for the event data store. Amazon Web Services services like Lake Formation use this federation role to access data for the federated event data store. The federation role must exist in your account and provide the <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-federation.html#query-federation-permissions-role">required minimum permissions</a>.</p>
63    pub fn get_federation_role_arn(&self) -> &::std::option::Option<::std::string::String> {
64        &self.federation_role_arn
65    }
66    /// Consumes the builder and constructs a [`EnableFederationInput`](crate::operation::enable_federation::EnableFederationInput).
67    pub fn build(
68        self,
69    ) -> ::std::result::Result<crate::operation::enable_federation::EnableFederationInput, ::aws_smithy_types::error::operation::BuildError> {
70        ::std::result::Result::Ok(crate::operation::enable_federation::EnableFederationInput {
71            event_data_store: self.event_data_store,
72            federation_role_arn: self.federation_role_arn,
73        })
74    }
75}