Struct aws_sdk_grafana::model::saml_configuration::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for SamlConfiguration
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn idp_metadata(self, input: IdpMetadata) -> Self
pub fn idp_metadata(self, input: IdpMetadata) -> Self
A structure containing the identity provider (IdP) metadata used to integrate the identity provider with this workspace.
sourcepub fn set_idp_metadata(self, input: Option<IdpMetadata>) -> Self
pub fn set_idp_metadata(self, input: Option<IdpMetadata>) -> Self
A structure containing the identity provider (IdP) metadata used to integrate the identity provider with this workspace.
Examples found in repository?
2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512
pub(crate) fn deser_structure_crate_model_saml_configuration<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::SamlConfiguration>,
aws_smithy_json::deserialize::error::DeserializeError,
>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder = crate::model::saml_configuration::Builder::default();
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"idpMetadata" => {
builder = builder.set_idp_metadata(
crate::json_deser::deser_union_crate_model_idp_metadata(
tokens,
)?,
);
}
"assertionAttributes" => {
builder = builder.set_assertion_attributes(
crate::json_deser::deser_structure_crate_model_assertion_attributes(tokens)?
);
}
"roleValues" => {
builder = builder.set_role_values(
crate::json_deser::deser_structure_crate_model_role_values(
tokens,
)?,
);
}
"allowedOrganizations" => {
builder = builder.set_allowed_organizations(
crate::json_deser::deser_list_com_amazonaws_grafana_allowed_organizations(tokens)?
);
}
"loginValidityDuration" => {
builder = builder.set_login_validity_duration(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}
sourcepub fn assertion_attributes(self, input: AssertionAttributes) -> Self
pub fn assertion_attributes(self, input: AssertionAttributes) -> Self
A structure that defines which attributes in the SAML assertion are to be used to define information about the users authenticated by that IdP to use the workspace.
sourcepub fn set_assertion_attributes(self, input: Option<AssertionAttributes>) -> Self
pub fn set_assertion_attributes(self, input: Option<AssertionAttributes>) -> Self
A structure that defines which attributes in the SAML assertion are to be used to define information about the users authenticated by that IdP to use the workspace.
Examples found in repository?
2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512
pub(crate) fn deser_structure_crate_model_saml_configuration<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::SamlConfiguration>,
aws_smithy_json::deserialize::error::DeserializeError,
>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder = crate::model::saml_configuration::Builder::default();
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"idpMetadata" => {
builder = builder.set_idp_metadata(
crate::json_deser::deser_union_crate_model_idp_metadata(
tokens,
)?,
);
}
"assertionAttributes" => {
builder = builder.set_assertion_attributes(
crate::json_deser::deser_structure_crate_model_assertion_attributes(tokens)?
);
}
"roleValues" => {
builder = builder.set_role_values(
crate::json_deser::deser_structure_crate_model_role_values(
tokens,
)?,
);
}
"allowedOrganizations" => {
builder = builder.set_allowed_organizations(
crate::json_deser::deser_list_com_amazonaws_grafana_allowed_organizations(tokens)?
);
}
"loginValidityDuration" => {
builder = builder.set_login_validity_duration(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}
sourcepub fn role_values(self, input: RoleValues) -> Self
pub fn role_values(self, input: RoleValues) -> Self
A structure containing arrays that map group names in the SAML assertion to the Grafana Admin
and Editor
roles in the workspace.
sourcepub fn set_role_values(self, input: Option<RoleValues>) -> Self
pub fn set_role_values(self, input: Option<RoleValues>) -> Self
A structure containing arrays that map group names in the SAML assertion to the Grafana Admin
and Editor
roles in the workspace.
Examples found in repository?
2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512
pub(crate) fn deser_structure_crate_model_saml_configuration<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::SamlConfiguration>,
aws_smithy_json::deserialize::error::DeserializeError,
>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder = crate::model::saml_configuration::Builder::default();
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"idpMetadata" => {
builder = builder.set_idp_metadata(
crate::json_deser::deser_union_crate_model_idp_metadata(
tokens,
)?,
);
}
"assertionAttributes" => {
builder = builder.set_assertion_attributes(
crate::json_deser::deser_structure_crate_model_assertion_attributes(tokens)?
);
}
"roleValues" => {
builder = builder.set_role_values(
crate::json_deser::deser_structure_crate_model_role_values(
tokens,
)?,
);
}
"allowedOrganizations" => {
builder = builder.set_allowed_organizations(
crate::json_deser::deser_list_com_amazonaws_grafana_allowed_organizations(tokens)?
);
}
"loginValidityDuration" => {
builder = builder.set_login_validity_duration(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}
sourcepub fn allowed_organizations(self, input: impl Into<String>) -> Self
pub fn allowed_organizations(self, input: impl Into<String>) -> Self
Appends an item to allowed_organizations
.
To override the contents of this collection use set_allowed_organizations
.
Lists which organizations defined in the SAML assertion are allowed to use the Amazon Managed Grafana workspace. If this is empty, all organizations in the assertion attribute have access.
sourcepub fn set_allowed_organizations(self, input: Option<Vec<String>>) -> Self
pub fn set_allowed_organizations(self, input: Option<Vec<String>>) -> Self
Lists which organizations defined in the SAML assertion are allowed to use the Amazon Managed Grafana workspace. If this is empty, all organizations in the assertion attribute have access.
Examples found in repository?
2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512
pub(crate) fn deser_structure_crate_model_saml_configuration<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::SamlConfiguration>,
aws_smithy_json::deserialize::error::DeserializeError,
>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder = crate::model::saml_configuration::Builder::default();
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"idpMetadata" => {
builder = builder.set_idp_metadata(
crate::json_deser::deser_union_crate_model_idp_metadata(
tokens,
)?,
);
}
"assertionAttributes" => {
builder = builder.set_assertion_attributes(
crate::json_deser::deser_structure_crate_model_assertion_attributes(tokens)?
);
}
"roleValues" => {
builder = builder.set_role_values(
crate::json_deser::deser_structure_crate_model_role_values(
tokens,
)?,
);
}
"allowedOrganizations" => {
builder = builder.set_allowed_organizations(
crate::json_deser::deser_list_com_amazonaws_grafana_allowed_organizations(tokens)?
);
}
"loginValidityDuration" => {
builder = builder.set_login_validity_duration(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}
sourcepub fn login_validity_duration(self, input: i32) -> Self
pub fn login_validity_duration(self, input: i32) -> Self
How long a sign-on session by a SAML user is valid, before the user has to sign on again.
sourcepub fn set_login_validity_duration(self, input: Option<i32>) -> Self
pub fn set_login_validity_duration(self, input: Option<i32>) -> Self
How long a sign-on session by a SAML user is valid, before the user has to sign on again.
Examples found in repository?
2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512
pub(crate) fn deser_structure_crate_model_saml_configuration<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::SamlConfiguration>,
aws_smithy_json::deserialize::error::DeserializeError,
>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder = crate::model::saml_configuration::Builder::default();
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"idpMetadata" => {
builder = builder.set_idp_metadata(
crate::json_deser::deser_union_crate_model_idp_metadata(
tokens,
)?,
);
}
"assertionAttributes" => {
builder = builder.set_assertion_attributes(
crate::json_deser::deser_structure_crate_model_assertion_attributes(tokens)?
);
}
"roleValues" => {
builder = builder.set_role_values(
crate::json_deser::deser_structure_crate_model_role_values(
tokens,
)?,
);
}
"allowedOrganizations" => {
builder = builder.set_allowed_organizations(
crate::json_deser::deser_list_com_amazonaws_grafana_allowed_organizations(tokens)?
);
}
"loginValidityDuration" => {
builder = builder.set_login_validity_duration(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}
sourcepub fn build(self) -> SamlConfiguration
pub fn build(self) -> SamlConfiguration
Consumes the builder and constructs a SamlConfiguration
.
Examples found in repository?
2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512
pub(crate) fn deser_structure_crate_model_saml_configuration<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::SamlConfiguration>,
aws_smithy_json::deserialize::error::DeserializeError,
>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder = crate::model::saml_configuration::Builder::default();
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"idpMetadata" => {
builder = builder.set_idp_metadata(
crate::json_deser::deser_union_crate_model_idp_metadata(
tokens,
)?,
);
}
"assertionAttributes" => {
builder = builder.set_assertion_attributes(
crate::json_deser::deser_structure_crate_model_assertion_attributes(tokens)?
);
}
"roleValues" => {
builder = builder.set_role_values(
crate::json_deser::deser_structure_crate_model_role_values(
tokens,
)?,
);
}
"allowedOrganizations" => {
builder = builder.set_allowed_organizations(
crate::json_deser::deser_list_com_amazonaws_grafana_allowed_organizations(tokens)?
);
}
"loginValidityDuration" => {
builder = builder.set_login_validity_duration(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}