pub enum RedshiftCredentials {
Password {
password: String,
},
Iam {
region: Option<String>,
cluster_identifier: Option<String>,
db_user: Option<String>,
workgroup_name: Option<String>,
auto_create: bool,
db_groups: Vec<String>,
duration_secs: Option<u32>,
aws_credentials: RedshiftAwsCredentials,
endpoint_url: Option<String>,
},
RedshiftDataApi {
region: Option<String>,
cluster_identifier: Option<String>,
workgroup_name: Option<String>,
secret_arn: Option<String>,
db_user: Option<String>,
aws_credentials: RedshiftAwsCredentials,
endpoint_url: Option<String>,
},
}Expand description
How to authenticate with Amazon Redshift.
Serializes as { type: <method>, config: { … } } (adjacent tagging,
snake_case discriminators) — the consistent auth wire shape shared by every
faucet connector.
Password— a database user and password over the PostgreSQL wire protocol.Iam— temporary database credentials fromredshift:GetClusterCredentials(provisioned cluster) orredshift-serverless:GetCredentials(workgroup), refreshed before they expire, over the PostgreSQL wire protocol.RedshiftDataApi— every statement runs through the Redshift Data API over HTTPS; no network path to the cluster is needed.
Variants§
Password
Username/password authentication (the user comes from
RedshiftConnection::user).
Iam
IAM authentication with temporary database credentials. Set exactly
one of cluster_identifier (provisioned, GetClusterCredentials) or
workgroup_name (serverless, GetCredentials). The connection then
uses the returned user and password over the PostgreSQL wire protocol
(host, port, database and TLS as configured), and new pool
connections get fresh credentials before the old ones expire.
Fields
region: Option<String>AWS region of the cluster or workgroup. None uses the SDK
default chain (AWS_REGION, profile).
db_user: Option<String>Database user to request credentials for (provisioned only).
Defaults to RedshiftConnection::user.
workgroup_name: Option<String>Serverless workgroup name (redshift-serverless:GetCredentials);
the database user is derived from the IAM identity.
duration_secs: Option<u32>Lifetime of the temporary credentials, 900–3600 seconds. None
uses the service default (900).
aws_credentials: RedshiftAwsCredentialsAWS credentials used to call the credentials API. Defaults to the SDK default chain.
RedshiftDataApi
Every statement runs through the Redshift Data API over HTTPS
(ExecuteStatement, DescribeStatement, GetStatementResult), not the
PostgreSQL wire protocol, so host, port, user and the TLS settings
are not used. Set exactly one of cluster_identifier or
workgroup_name; a cluster also needs db_user (temporary
credentials) or secret_arn.
Fields
db_user: Option<String>Database user to authenticate as with temporary credentials (provisioned clusters only).
aws_credentials: RedshiftAwsCredentialsAWS credentials used to call the Data API. Defaults to the SDK default chain.
Trait Implementations§
Source§impl Clone for RedshiftCredentials
impl Clone for RedshiftCredentials
Source§fn clone(&self) -> RedshiftCredentials
fn clone(&self) -> RedshiftCredentials
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RedshiftCredentials
impl Debug for RedshiftCredentials
Source§impl<'de> Deserialize<'de> for RedshiftCredentials
impl<'de> Deserialize<'de> for RedshiftCredentials
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<RedshiftCredentials, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<RedshiftCredentials, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for RedshiftCredentials
impl JsonSchema for RedshiftCredentials
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl Serialize for RedshiftCredentials
impl Serialize for RedshiftCredentials
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Auto Trait Implementations§
impl Freeze for RedshiftCredentials
impl RefUnwindSafe for RedshiftCredentials
impl Send for RedshiftCredentials
impl Sync for RedshiftCredentials
impl Unpin for RedshiftCredentials
impl UnsafeUnpin for RedshiftCredentials
impl UnwindSafe for RedshiftCredentials
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more