aws_sdk_glue/operation/get_connection/
_get_connection_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 GetConnectionInput {
6    /// <p>The ID of the Data Catalog in which the connection resides. If none is provided, the Amazon Web Services account ID is used by default.</p>
7    pub catalog_id: ::std::option::Option<::std::string::String>,
8    /// <p>The name of the connection definition to retrieve.</p>
9    pub name: ::std::option::Option<::std::string::String>,
10    /// <p>Allows you to retrieve the connection metadata without returning the password. For instance, the Glue console uses this flag to retrieve the connection, and does not display the password. Set this parameter when the caller might not have permission to use the KMS key to decrypt the password, but it does have permission to access the rest of the connection properties.</p>
11    pub hide_password: ::std::option::Option<bool>,
12    /// <p>For connections that may be used in multiple services, specifies returning properties for the specified compute environment.</p>
13    pub apply_override_for_compute_environment: ::std::option::Option<crate::types::ComputeEnvironment>,
14}
15impl GetConnectionInput {
16    /// <p>The ID of the Data Catalog in which the connection resides. If none is provided, the Amazon Web Services account ID is used by default.</p>
17    pub fn catalog_id(&self) -> ::std::option::Option<&str> {
18        self.catalog_id.as_deref()
19    }
20    /// <p>The name of the connection definition to retrieve.</p>
21    pub fn name(&self) -> ::std::option::Option<&str> {
22        self.name.as_deref()
23    }
24    /// <p>Allows you to retrieve the connection metadata without returning the password. For instance, the Glue console uses this flag to retrieve the connection, and does not display the password. Set this parameter when the caller might not have permission to use the KMS key to decrypt the password, but it does have permission to access the rest of the connection properties.</p>
25    pub fn hide_password(&self) -> ::std::option::Option<bool> {
26        self.hide_password
27    }
28    /// <p>For connections that may be used in multiple services, specifies returning properties for the specified compute environment.</p>
29    pub fn apply_override_for_compute_environment(&self) -> ::std::option::Option<&crate::types::ComputeEnvironment> {
30        self.apply_override_for_compute_environment.as_ref()
31    }
32}
33impl GetConnectionInput {
34    /// Creates a new builder-style object to manufacture [`GetConnectionInput`](crate::operation::get_connection::GetConnectionInput).
35    pub fn builder() -> crate::operation::get_connection::builders::GetConnectionInputBuilder {
36        crate::operation::get_connection::builders::GetConnectionInputBuilder::default()
37    }
38}
39
40/// A builder for [`GetConnectionInput`](crate::operation::get_connection::GetConnectionInput).
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct GetConnectionInputBuilder {
44    pub(crate) catalog_id: ::std::option::Option<::std::string::String>,
45    pub(crate) name: ::std::option::Option<::std::string::String>,
46    pub(crate) hide_password: ::std::option::Option<bool>,
47    pub(crate) apply_override_for_compute_environment: ::std::option::Option<crate::types::ComputeEnvironment>,
48}
49impl GetConnectionInputBuilder {
50    /// <p>The ID of the Data Catalog in which the connection resides. If none is provided, the Amazon Web Services account ID is used by default.</p>
51    pub fn catalog_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
52        self.catalog_id = ::std::option::Option::Some(input.into());
53        self
54    }
55    /// <p>The ID of the Data Catalog in which the connection resides. If none is provided, the Amazon Web Services account ID is used by default.</p>
56    pub fn set_catalog_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
57        self.catalog_id = input;
58        self
59    }
60    /// <p>The ID of the Data Catalog in which the connection resides. If none is provided, the Amazon Web Services account ID is used by default.</p>
61    pub fn get_catalog_id(&self) -> &::std::option::Option<::std::string::String> {
62        &self.catalog_id
63    }
64    /// <p>The name of the connection definition to retrieve.</p>
65    /// This field is required.
66    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
67        self.name = ::std::option::Option::Some(input.into());
68        self
69    }
70    /// <p>The name of the connection definition to retrieve.</p>
71    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
72        self.name = input;
73        self
74    }
75    /// <p>The name of the connection definition to retrieve.</p>
76    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
77        &self.name
78    }
79    /// <p>Allows you to retrieve the connection metadata without returning the password. For instance, the Glue console uses this flag to retrieve the connection, and does not display the password. Set this parameter when the caller might not have permission to use the KMS key to decrypt the password, but it does have permission to access the rest of the connection properties.</p>
80    pub fn hide_password(mut self, input: bool) -> Self {
81        self.hide_password = ::std::option::Option::Some(input);
82        self
83    }
84    /// <p>Allows you to retrieve the connection metadata without returning the password. For instance, the Glue console uses this flag to retrieve the connection, and does not display the password. Set this parameter when the caller might not have permission to use the KMS key to decrypt the password, but it does have permission to access the rest of the connection properties.</p>
85    pub fn set_hide_password(mut self, input: ::std::option::Option<bool>) -> Self {
86        self.hide_password = input;
87        self
88    }
89    /// <p>Allows you to retrieve the connection metadata without returning the password. For instance, the Glue console uses this flag to retrieve the connection, and does not display the password. Set this parameter when the caller might not have permission to use the KMS key to decrypt the password, but it does have permission to access the rest of the connection properties.</p>
90    pub fn get_hide_password(&self) -> &::std::option::Option<bool> {
91        &self.hide_password
92    }
93    /// <p>For connections that may be used in multiple services, specifies returning properties for the specified compute environment.</p>
94    pub fn apply_override_for_compute_environment(mut self, input: crate::types::ComputeEnvironment) -> Self {
95        self.apply_override_for_compute_environment = ::std::option::Option::Some(input);
96        self
97    }
98    /// <p>For connections that may be used in multiple services, specifies returning properties for the specified compute environment.</p>
99    pub fn set_apply_override_for_compute_environment(mut self, input: ::std::option::Option<crate::types::ComputeEnvironment>) -> Self {
100        self.apply_override_for_compute_environment = input;
101        self
102    }
103    /// <p>For connections that may be used in multiple services, specifies returning properties for the specified compute environment.</p>
104    pub fn get_apply_override_for_compute_environment(&self) -> &::std::option::Option<crate::types::ComputeEnvironment> {
105        &self.apply_override_for_compute_environment
106    }
107    /// Consumes the builder and constructs a [`GetConnectionInput`](crate::operation::get_connection::GetConnectionInput).
108    pub fn build(
109        self,
110    ) -> ::std::result::Result<crate::operation::get_connection::GetConnectionInput, ::aws_smithy_types::error::operation::BuildError> {
111        ::std::result::Result::Ok(crate::operation::get_connection::GetConnectionInput {
112            catalog_id: self.catalog_id,
113            name: self.name,
114            hide_password: self.hide_password,
115            apply_override_for_compute_environment: self.apply_override_for_compute_environment,
116        })
117    }
118}