1. Packages
  2. Keycloak
  3. API Docs
  4. AttributeImporterIdentityProviderMapper
Keycloak v5.3.2 published on Friday, May 10, 2024 by Pulumi

keycloak.AttributeImporterIdentityProviderMapper

Explore with Pulumi AI

keycloak logo
Keycloak v5.3.2 published on Friday, May 10, 2024 by Pulumi

    # keycloak.AttributeImporterIdentityProviderMapper

    Allows to create and manage identity provider mappers within Keycloak.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as keycloak from "@pulumi/keycloak";
    
    const testMapper = new keycloak.AttributeImporterIdentityProviderMapper("test_mapper", {
        realm: "my-realm",
        name: "my-mapper",
        identityProviderAlias: "idp_alias",
        attributeName: "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname",
        userAttribute: "lastName",
    });
    
    import pulumi
    import pulumi_keycloak as keycloak
    
    test_mapper = keycloak.AttributeImporterIdentityProviderMapper("test_mapper",
        realm="my-realm",
        name="my-mapper",
        identity_provider_alias="idp_alias",
        attribute_name="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname",
        user_attribute="lastName")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-keycloak/sdk/v5/go/keycloak"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := keycloak.NewAttributeImporterIdentityProviderMapper(ctx, "test_mapper", &keycloak.AttributeImporterIdentityProviderMapperArgs{
    			Realm:                 pulumi.String("my-realm"),
    			Name:                  pulumi.String("my-mapper"),
    			IdentityProviderAlias: pulumi.String("idp_alias"),
    			AttributeName:         pulumi.String("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname"),
    			UserAttribute:         pulumi.String("lastName"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Keycloak = Pulumi.Keycloak;
    
    return await Deployment.RunAsync(() => 
    {
        var testMapper = new Keycloak.AttributeImporterIdentityProviderMapper("test_mapper", new()
        {
            Realm = "my-realm",
            Name = "my-mapper",
            IdentityProviderAlias = "idp_alias",
            AttributeName = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname",
            UserAttribute = "lastName",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.keycloak.AttributeImporterIdentityProviderMapper;
    import com.pulumi.keycloak.AttributeImporterIdentityProviderMapperArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var testMapper = new AttributeImporterIdentityProviderMapper("testMapper", AttributeImporterIdentityProviderMapperArgs.builder()        
                .realm("my-realm")
                .name("my-mapper")
                .identityProviderAlias("idp_alias")
                .attributeName("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname")
                .userAttribute("lastName")
                .build());
    
        }
    }
    
    resources:
      testMapper:
        type: keycloak:AttributeImporterIdentityProviderMapper
        name: test_mapper
        properties:
          realm: my-realm
          name: my-mapper
          identityProviderAlias: idp_alias
          attributeName: http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname
          userAttribute: lastName
    

    Argument Reference

    The following arguments are supported:

    • realm - (Required) The name of the realm.
    • name - (Required) The name of the mapper.
    • identity_provider_alias - (Required) The alias of the associated identity provider.
    • user_attribute - (Required) The user attribute name to store SAML attribute.
    • attribute_name - (Optional) The Name of attribute to search for in assertion. You can leave this blank and specify a friendly name instead.
    • attribute_friendly_name - (Optional) The friendly name of attribute to search for in assertion. You can leave this blank and specify an attribute name instead.
    • claim_name - (Optional) The claim name.

    Import

    Identity provider mapper can be imported using the format {{realm_id}}/{{idp_alias}}/{{idp_mapper_id}}, where idp_alias is the identity provider alias, and idp_mapper_id is the unique ID that Keycloak assigns to the mapper upon creation. This value can be found in the URI when editing this mapper in the GUI, and is typically a GUID.

    Example:

    $ terraform import keycloak_attribute_importer_identity_provider_mapper.test_mapper my-realm/my-mapper/f446db98-7133-4e30-b18a-3d28fde7ca1b
    

    Create AttributeImporterIdentityProviderMapper Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new AttributeImporterIdentityProviderMapper(name: string, args: AttributeImporterIdentityProviderMapperArgs, opts?: CustomResourceOptions);
    @overload
    def AttributeImporterIdentityProviderMapper(resource_name: str,
                                                args: AttributeImporterIdentityProviderMapperArgs,
                                                opts: Optional[ResourceOptions] = None)
    
    @overload
    def AttributeImporterIdentityProviderMapper(resource_name: str,
                                                opts: Optional[ResourceOptions] = None,
                                                identity_provider_alias: Optional[str] = None,
                                                realm: Optional[str] = None,
                                                user_attribute: Optional[str] = None,
                                                attribute_friendly_name: Optional[str] = None,
                                                attribute_name: Optional[str] = None,
                                                claim_name: Optional[str] = None,
                                                extra_config: Optional[Mapping[str, Any]] = None,
                                                name: Optional[str] = None)
    func NewAttributeImporterIdentityProviderMapper(ctx *Context, name string, args AttributeImporterIdentityProviderMapperArgs, opts ...ResourceOption) (*AttributeImporterIdentityProviderMapper, error)
    public AttributeImporterIdentityProviderMapper(string name, AttributeImporterIdentityProviderMapperArgs args, CustomResourceOptions? opts = null)
    public AttributeImporterIdentityProviderMapper(String name, AttributeImporterIdentityProviderMapperArgs args)
    public AttributeImporterIdentityProviderMapper(String name, AttributeImporterIdentityProviderMapperArgs args, CustomResourceOptions options)
    
    type: keycloak:AttributeImporterIdentityProviderMapper
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args AttributeImporterIdentityProviderMapperArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args AttributeImporterIdentityProviderMapperArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args AttributeImporterIdentityProviderMapperArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AttributeImporterIdentityProviderMapperArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AttributeImporterIdentityProviderMapperArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var attributeImporterIdentityProviderMapperResource = new Keycloak.AttributeImporterIdentityProviderMapper("attributeImporterIdentityProviderMapperResource", new()
    {
        IdentityProviderAlias = "string",
        Realm = "string",
        UserAttribute = "string",
        AttributeFriendlyName = "string",
        AttributeName = "string",
        ClaimName = "string",
        ExtraConfig = 
        {
            { "string", "any" },
        },
        Name = "string",
    });
    
    example, err := keycloak.NewAttributeImporterIdentityProviderMapper(ctx, "attributeImporterIdentityProviderMapperResource", &keycloak.AttributeImporterIdentityProviderMapperArgs{
    	IdentityProviderAlias: pulumi.String("string"),
    	Realm:                 pulumi.String("string"),
    	UserAttribute:         pulumi.String("string"),
    	AttributeFriendlyName: pulumi.String("string"),
    	AttributeName:         pulumi.String("string"),
    	ClaimName:             pulumi.String("string"),
    	ExtraConfig: pulumi.Map{
    		"string": pulumi.Any("any"),
    	},
    	Name: pulumi.String("string"),
    })
    
    var attributeImporterIdentityProviderMapperResource = new AttributeImporterIdentityProviderMapper("attributeImporterIdentityProviderMapperResource", AttributeImporterIdentityProviderMapperArgs.builder()
        .identityProviderAlias("string")
        .realm("string")
        .userAttribute("string")
        .attributeFriendlyName("string")
        .attributeName("string")
        .claimName("string")
        .extraConfig(Map.of("string", "any"))
        .name("string")
        .build());
    
    attribute_importer_identity_provider_mapper_resource = keycloak.AttributeImporterIdentityProviderMapper("attributeImporterIdentityProviderMapperResource",
        identity_provider_alias="string",
        realm="string",
        user_attribute="string",
        attribute_friendly_name="string",
        attribute_name="string",
        claim_name="string",
        extra_config={
            "string": "any",
        },
        name="string")
    
    const attributeImporterIdentityProviderMapperResource = new keycloak.AttributeImporterIdentityProviderMapper("attributeImporterIdentityProviderMapperResource", {
        identityProviderAlias: "string",
        realm: "string",
        userAttribute: "string",
        attributeFriendlyName: "string",
        attributeName: "string",
        claimName: "string",
        extraConfig: {
            string: "any",
        },
        name: "string",
    });
    
    type: keycloak:AttributeImporterIdentityProviderMapper
    properties:
        attributeFriendlyName: string
        attributeName: string
        claimName: string
        extraConfig:
            string: any
        identityProviderAlias: string
        name: string
        realm: string
        userAttribute: string
    

    AttributeImporterIdentityProviderMapper Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The AttributeImporterIdentityProviderMapper resource accepts the following input properties:

    IdentityProviderAlias string
    IDP Alias
    Realm string
    Realm Name
    UserAttribute string
    User Attribute
    AttributeFriendlyName string
    Attribute Friendly Name
    AttributeName string
    Attribute Name
    ClaimName string
    Claim Name
    ExtraConfig Dictionary<string, object>
    Name string
    IDP Mapper Name
    IdentityProviderAlias string
    IDP Alias
    Realm string
    Realm Name
    UserAttribute string
    User Attribute
    AttributeFriendlyName string
    Attribute Friendly Name
    AttributeName string
    Attribute Name
    ClaimName string
    Claim Name
    ExtraConfig map[string]interface{}
    Name string
    IDP Mapper Name
    identityProviderAlias String
    IDP Alias
    realm String
    Realm Name
    userAttribute String
    User Attribute
    attributeFriendlyName String
    Attribute Friendly Name
    attributeName String
    Attribute Name
    claimName String
    Claim Name
    extraConfig Map<String,Object>
    name String
    IDP Mapper Name
    identityProviderAlias string
    IDP Alias
    realm string
    Realm Name
    userAttribute string
    User Attribute
    attributeFriendlyName string
    Attribute Friendly Name
    attributeName string
    Attribute Name
    claimName string
    Claim Name
    extraConfig {[key: string]: any}
    name string
    IDP Mapper Name
    identity_provider_alias str
    IDP Alias
    realm str
    Realm Name
    user_attribute str
    User Attribute
    attribute_friendly_name str
    Attribute Friendly Name
    attribute_name str
    Attribute Name
    claim_name str
    Claim Name
    extra_config Mapping[str, Any]
    name str
    IDP Mapper Name
    identityProviderAlias String
    IDP Alias
    realm String
    Realm Name
    userAttribute String
    User Attribute
    attributeFriendlyName String
    Attribute Friendly Name
    attributeName String
    Attribute Name
    claimName String
    Claim Name
    extraConfig Map<Any>
    name String
    IDP Mapper Name

    Outputs

    All input properties are implicitly available as output properties. Additionally, the AttributeImporterIdentityProviderMapper resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing AttributeImporterIdentityProviderMapper Resource

    Get an existing AttributeImporterIdentityProviderMapper resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: AttributeImporterIdentityProviderMapperState, opts?: CustomResourceOptions): AttributeImporterIdentityProviderMapper
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            attribute_friendly_name: Optional[str] = None,
            attribute_name: Optional[str] = None,
            claim_name: Optional[str] = None,
            extra_config: Optional[Mapping[str, Any]] = None,
            identity_provider_alias: Optional[str] = None,
            name: Optional[str] = None,
            realm: Optional[str] = None,
            user_attribute: Optional[str] = None) -> AttributeImporterIdentityProviderMapper
    func GetAttributeImporterIdentityProviderMapper(ctx *Context, name string, id IDInput, state *AttributeImporterIdentityProviderMapperState, opts ...ResourceOption) (*AttributeImporterIdentityProviderMapper, error)
    public static AttributeImporterIdentityProviderMapper Get(string name, Input<string> id, AttributeImporterIdentityProviderMapperState? state, CustomResourceOptions? opts = null)
    public static AttributeImporterIdentityProviderMapper get(String name, Output<String> id, AttributeImporterIdentityProviderMapperState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AttributeFriendlyName string
    Attribute Friendly Name
    AttributeName string
    Attribute Name
    ClaimName string
    Claim Name
    ExtraConfig Dictionary<string, object>
    IdentityProviderAlias string
    IDP Alias
    Name string
    IDP Mapper Name
    Realm string
    Realm Name
    UserAttribute string
    User Attribute
    AttributeFriendlyName string
    Attribute Friendly Name
    AttributeName string
    Attribute Name
    ClaimName string
    Claim Name
    ExtraConfig map[string]interface{}
    IdentityProviderAlias string
    IDP Alias
    Name string
    IDP Mapper Name
    Realm string
    Realm Name
    UserAttribute string
    User Attribute
    attributeFriendlyName String
    Attribute Friendly Name
    attributeName String
    Attribute Name
    claimName String
    Claim Name
    extraConfig Map<String,Object>
    identityProviderAlias String
    IDP Alias
    name String
    IDP Mapper Name
    realm String
    Realm Name
    userAttribute String
    User Attribute
    attributeFriendlyName string
    Attribute Friendly Name
    attributeName string
    Attribute Name
    claimName string
    Claim Name
    extraConfig {[key: string]: any}
    identityProviderAlias string
    IDP Alias
    name string
    IDP Mapper Name
    realm string
    Realm Name
    userAttribute string
    User Attribute
    attribute_friendly_name str
    Attribute Friendly Name
    attribute_name str
    Attribute Name
    claim_name str
    Claim Name
    extra_config Mapping[str, Any]
    identity_provider_alias str
    IDP Alias
    name str
    IDP Mapper Name
    realm str
    Realm Name
    user_attribute str
    User Attribute
    attributeFriendlyName String
    Attribute Friendly Name
    attributeName String
    Attribute Name
    claimName String
    Claim Name
    extraConfig Map<Any>
    identityProviderAlias String
    IDP Alias
    name String
    IDP Mapper Name
    realm String
    Realm Name
    userAttribute String
    User Attribute

    Package Details

    Repository
    Keycloak pulumi/pulumi-keycloak
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the keycloak Terraform Provider.
    keycloak logo
    Keycloak v5.3.2 published on Friday, May 10, 2024 by Pulumi