pub struct Builder { /* private fields */ }
Expand description

A builder for SamlConfiguration.

Implementations§

A structure containing the identity provider (IdP) metadata used to integrate the identity provider with this workspace.

A structure containing the identity provider (IdP) metadata used to integrate the identity provider with this workspace.

Examples found in repository?
src/json_deser.rs (lines 2459-2463)
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",
            ),
        ),
    }
}

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.

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?
src/json_deser.rs (lines 2466-2468)
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",
            ),
        ),
    }
}

A structure containing arrays that map group names in the SAML assertion to the Grafana Admin and Editor roles in the workspace.

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?
src/json_deser.rs (lines 2471-2475)
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",
            ),
        ),
    }
}

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.

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?
src/json_deser.rs (lines 2478-2480)
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",
            ),
        ),
    }
}

How long a sign-on session by a SAML user is valid, before the user has to sign on again.

How long a sign-on session by a SAML user is valid, before the user has to sign on again.

Examples found in repository?
src/json_deser.rs (lines 2483-2489)
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",
            ),
        ),
    }
}

Consumes the builder and constructs a SamlConfiguration.

Examples found in repository?
src/json_deser.rs (line 2504)
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",
            ),
        ),
    }
}

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more