# SamlConfigurationProperty

A structure containing information about how this workspace works with SAML.

- Source: Generated at build time
- Type last changed: v2.93.0 · 23 Aug 2023

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_grafana as grafana } from 'aws-cdk-lib';
const samlConfigurationProperty: grafana.CfnWorkspace.SamlConfigurationProperty = {
  idpMetadata: {
    url: 'url',
    xml: 'xml',
  },

  // the properties below are optional
  allowedOrganizations: ['allowedOrganizations'],
  assertionAttributes: {
    email: 'email',
    groups: 'groups',
    login: 'login',
    name: 'name',
    org: 'org',
    role: 'role',
  },
  loginValidityDuration: 123,
  roleValues: {
    admin: ['admin'],
    editor: ['editor'],
  },
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_grafana as grafana

saml_configuration_property = grafana.CfnWorkspace.SamlConfigurationProperty(
    idp_metadata=grafana.CfnWorkspace.IdpMetadataProperty(
        url="url",
        xml="xml"
    ),

    # the properties below are optional
    allowed_organizations=["allowedOrganizations"],
    assertion_attributes=grafana.CfnWorkspace.AssertionAttributesProperty(
        email="email",
        groups="groups",
        login="login",
        name="name",
        org="org",
        role="role"
    ),
    login_validity_duration=123,
    role_values=grafana.CfnWorkspace.RoleValuesProperty(
        admin=["admin"],
        editor=["editor"]
    )
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.grafana.*;

SamlConfigurationProperty samlConfigurationProperty = SamlConfigurationProperty.builder()
        .idpMetadata(IdpMetadataProperty.builder()
                .url("url")
                .xml("xml")
                .build())

        // the properties below are optional
        .allowedOrganizations(List.of("allowedOrganizations"))
        .assertionAttributes(AssertionAttributesProperty.builder()
                .email("email")
                .groups("groups")
                .login("login")
                .name("name")
                .org("org")
                .role("role")
                .build())
        .loginValidityDuration(123)
        .roleValues(RoleValuesProperty.builder()
                .admin(List.of("admin"))
                .editor(List.of("editor"))
                .build())
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Grafana;

var samlConfigurationProperty = new SamlConfigurationProperty {
    IdpMetadata = new IdpMetadataProperty {
        Url = "url",
        Xml = "xml"
    },

    // the properties below are optional
    AllowedOrganizations = new [] { "allowedOrganizations" },
    AssertionAttributes = new AssertionAttributesProperty {
        Email = "email",
        Groups = "groups",
        Login = "login",
        Name = "name",
        Org = "org",
        Role = "role"
    },
    LoginValidityDuration = 123,
    RoleValues = new RoleValuesProperty {
        Admin = new [] { "admin" },
        Editor = new [] { "editor" }
    }
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

samlConfigurationProperty := &SamlConfigurationProperty{
	IdpMetadata: &IdpMetadataProperty{
		Url: jsii.String("url"),
		Xml: jsii.String("xml"),
	},

	// the properties below are optional
	AllowedOrganizations: []*string{
		jsii.String("allowedOrganizations"),
	},
	AssertionAttributes: &AssertionAttributesProperty{
		Email: jsii.String("email"),
		Groups: jsii.String("groups"),
		Login: jsii.String("login"),
		Name: jsii.String("name"),
		Org: jsii.String("org"),
		Role: jsii.String("role"),
	},
	LoginValidityDuration: jsii.Number(123),
	RoleValues: &RoleValuesProperty{
		Admin: []*string{
			jsii.String("admin"),
		},
		Editor: []*string{
			jsii.String("editor"),
		},
	},
}
```

## Properties

- `allowedOrganizations`: string[] — 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.

- `assertionAttributes`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnWorkspace.AssertionAttributesProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_grafana.CfnWorkspace.AssertionAttributesProperty.html) — 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.

- `idpMetadata`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnWorkspace.IdpMetadataProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_grafana.CfnWorkspace.IdpMetadataProperty.html) (required) — A structure containing the identity provider (IdP) metadata used to integrate the identity provider with this workspace.

- `loginValidityDuration`: number — How long a sign-on session by a SAML user is valid, before the user has to sign on again.

- `roleValues`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnWorkspace.RoleValuesProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_grafana.CfnWorkspace.RoleValuesProperty.html) — A structure containing arrays that map group names in the SAML assertion to the Grafana `Admin` and `Editor` roles in the workspace.
