1. Packages
  2. AWS Classic
  3. API Docs
  4. iam
  5. SamlProvider

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.12.0 published on Wednesday, Nov 29, 2023 by Pulumi

aws.iam.SamlProvider

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.12.0 published on Wednesday, Nov 29, 2023 by Pulumi

    Provides an IAM SAML provider.

    Example Usage

    using System.Collections.Generic;
    using System.IO;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var @default = new Aws.Iam.SamlProvider("default", new()
        {
            SamlMetadataDocument = File.ReadAllText("saml-metadata.xml"),
        });
    
    });
    
    package main
    
    import (
    	"os"
    
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func readFileOrPanic(path string) pulumi.StringPtrInput {
    	data, err := os.ReadFile(path)
    	if err != nil {
    		panic(err.Error())
    	}
    	return pulumi.String(string(data))
    }
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := iam.NewSamlProvider(ctx, "default", &iam.SamlProviderArgs{
    			SamlMetadataDocument: readFileOrPanic("saml-metadata.xml"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.iam.SamlProvider;
    import com.pulumi.aws.iam.SamlProviderArgs;
    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 default_ = new SamlProvider("default", SamlProviderArgs.builder()        
                .samlMetadataDocument(Files.readString(Paths.get("saml-metadata.xml")))
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_aws as aws
    
    default = aws.iam.SamlProvider("default", saml_metadata_document=(lambda path: open(path).read())("saml-metadata.xml"))
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    import * as fs from "fs";
    
    const _default = new aws.iam.SamlProvider("default", {samlMetadataDocument: fs.readFileSync("saml-metadata.xml")});
    
    resources:
      default:
        type: aws:iam:SamlProvider
        properties:
          samlMetadataDocument:
            fn::readFile: saml-metadata.xml
    

    Create SamlProvider Resource

    new SamlProvider(name: string, args: SamlProviderArgs, opts?: CustomResourceOptions);
    @overload
    def SamlProvider(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     name: Optional[str] = None,
                     saml_metadata_document: Optional[str] = None,
                     tags: Optional[Mapping[str, str]] = None)
    @overload
    def SamlProvider(resource_name: str,
                     args: SamlProviderArgs,
                     opts: Optional[ResourceOptions] = None)
    func NewSamlProvider(ctx *Context, name string, args SamlProviderArgs, opts ...ResourceOption) (*SamlProvider, error)
    public SamlProvider(string name, SamlProviderArgs args, CustomResourceOptions? opts = null)
    public SamlProvider(String name, SamlProviderArgs args)
    public SamlProvider(String name, SamlProviderArgs args, CustomResourceOptions options)
    
    type: aws:iam:SamlProvider
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args SamlProviderArgs
    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 SamlProviderArgs
    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 SamlProviderArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SamlProviderArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SamlProviderArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    SamlProvider 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 SamlProvider resource accepts the following input properties:

    SamlMetadataDocument string

    An XML document generated by an identity provider that supports SAML 2.0.

    Name string

    The name of the provider to create.

    Tags Dictionary<string, string>

    Map of resource tags for the IAM SAML provider. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

    SamlMetadataDocument string

    An XML document generated by an identity provider that supports SAML 2.0.

    Name string

    The name of the provider to create.

    Tags map[string]string

    Map of resource tags for the IAM SAML provider. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

    samlMetadataDocument String

    An XML document generated by an identity provider that supports SAML 2.0.

    name String

    The name of the provider to create.

    tags Map<String,String>

    Map of resource tags for the IAM SAML provider. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

    samlMetadataDocument string

    An XML document generated by an identity provider that supports SAML 2.0.

    name string

    The name of the provider to create.

    tags {[key: string]: string}

    Map of resource tags for the IAM SAML provider. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

    saml_metadata_document str

    An XML document generated by an identity provider that supports SAML 2.0.

    name str

    The name of the provider to create.

    tags Mapping[str, str]

    Map of resource tags for the IAM SAML provider. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

    samlMetadataDocument String

    An XML document generated by an identity provider that supports SAML 2.0.

    name String

    The name of the provider to create.

    tags Map<String>

    Map of resource tags for the IAM SAML provider. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

    Outputs

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

    Arn string

    The ARN assigned by AWS for this provider.

    Id string

    The provider-assigned unique ID for this managed resource.

    TagsAll Dictionary<string, string>

    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:

    Please use tags instead.

    ValidUntil string

    The expiration date and time for the SAML provider in RFC1123 format, e.g., Mon, 02 Jan 2006 15:04:05 MST.

    Arn string

    The ARN assigned by AWS for this provider.

    Id string

    The provider-assigned unique ID for this managed resource.

    TagsAll map[string]string

    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:

    Please use tags instead.

    ValidUntil string

    The expiration date and time for the SAML provider in RFC1123 format, e.g., Mon, 02 Jan 2006 15:04:05 MST.

    arn String

    The ARN assigned by AWS for this provider.

    id String

    The provider-assigned unique ID for this managed resource.

    tagsAll Map<String,String>

    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:

    Please use tags instead.

    validUntil String

    The expiration date and time for the SAML provider in RFC1123 format, e.g., Mon, 02 Jan 2006 15:04:05 MST.

    arn string

    The ARN assigned by AWS for this provider.

    id string

    The provider-assigned unique ID for this managed resource.

    tagsAll {[key: string]: string}

    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:

    Please use tags instead.

    validUntil string

    The expiration date and time for the SAML provider in RFC1123 format, e.g., Mon, 02 Jan 2006 15:04:05 MST.

    arn str

    The ARN assigned by AWS for this provider.

    id str

    The provider-assigned unique ID for this managed resource.

    tags_all Mapping[str, str]

    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:

    Please use tags instead.

    valid_until str

    The expiration date and time for the SAML provider in RFC1123 format, e.g., Mon, 02 Jan 2006 15:04:05 MST.

    arn String

    The ARN assigned by AWS for this provider.

    id String

    The provider-assigned unique ID for this managed resource.

    tagsAll Map<String>

    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:

    Please use tags instead.

    validUntil String

    The expiration date and time for the SAML provider in RFC1123 format, e.g., Mon, 02 Jan 2006 15:04:05 MST.

    Look up Existing SamlProvider Resource

    Get an existing SamlProvider 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?: SamlProviderState, opts?: CustomResourceOptions): SamlProvider
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            arn: Optional[str] = None,
            name: Optional[str] = None,
            saml_metadata_document: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            tags_all: Optional[Mapping[str, str]] = None,
            valid_until: Optional[str] = None) -> SamlProvider
    func GetSamlProvider(ctx *Context, name string, id IDInput, state *SamlProviderState, opts ...ResourceOption) (*SamlProvider, error)
    public static SamlProvider Get(string name, Input<string> id, SamlProviderState? state, CustomResourceOptions? opts = null)
    public static SamlProvider get(String name, Output<String> id, SamlProviderState 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:
    Arn string

    The ARN assigned by AWS for this provider.

    Name string

    The name of the provider to create.

    SamlMetadataDocument string

    An XML document generated by an identity provider that supports SAML 2.0.

    Tags Dictionary<string, string>

    Map of resource tags for the IAM SAML provider. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

    TagsAll Dictionary<string, string>

    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:

    Please use tags instead.

    ValidUntil string

    The expiration date and time for the SAML provider in RFC1123 format, e.g., Mon, 02 Jan 2006 15:04:05 MST.

    Arn string

    The ARN assigned by AWS for this provider.

    Name string

    The name of the provider to create.

    SamlMetadataDocument string

    An XML document generated by an identity provider that supports SAML 2.0.

    Tags map[string]string

    Map of resource tags for the IAM SAML provider. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

    TagsAll map[string]string

    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:

    Please use tags instead.

    ValidUntil string

    The expiration date and time for the SAML provider in RFC1123 format, e.g., Mon, 02 Jan 2006 15:04:05 MST.

    arn String

    The ARN assigned by AWS for this provider.

    name String

    The name of the provider to create.

    samlMetadataDocument String

    An XML document generated by an identity provider that supports SAML 2.0.

    tags Map<String,String>

    Map of resource tags for the IAM SAML provider. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

    tagsAll Map<String,String>

    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:

    Please use tags instead.

    validUntil String

    The expiration date and time for the SAML provider in RFC1123 format, e.g., Mon, 02 Jan 2006 15:04:05 MST.

    arn string

    The ARN assigned by AWS for this provider.

    name string

    The name of the provider to create.

    samlMetadataDocument string

    An XML document generated by an identity provider that supports SAML 2.0.

    tags {[key: string]: string}

    Map of resource tags for the IAM SAML provider. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

    tagsAll {[key: string]: string}

    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:

    Please use tags instead.

    validUntil string

    The expiration date and time for the SAML provider in RFC1123 format, e.g., Mon, 02 Jan 2006 15:04:05 MST.

    arn str

    The ARN assigned by AWS for this provider.

    name str

    The name of the provider to create.

    saml_metadata_document str

    An XML document generated by an identity provider that supports SAML 2.0.

    tags Mapping[str, str]

    Map of resource tags for the IAM SAML provider. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

    tags_all Mapping[str, str]

    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:

    Please use tags instead.

    valid_until str

    The expiration date and time for the SAML provider in RFC1123 format, e.g., Mon, 02 Jan 2006 15:04:05 MST.

    arn String

    The ARN assigned by AWS for this provider.

    name String

    The name of the provider to create.

    samlMetadataDocument String

    An XML document generated by an identity provider that supports SAML 2.0.

    tags Map<String>

    Map of resource tags for the IAM SAML provider. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

    tagsAll Map<String>

    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:

    Please use tags instead.

    validUntil String

    The expiration date and time for the SAML provider in RFC1123 format, e.g., Mon, 02 Jan 2006 15:04:05 MST.

    Import

    Using pulumi import, import IAM SAML Providers using the arn. For example:

     $ pulumi import aws:iam/samlProvider:SamlProvider default arn:aws:iam::123456789012:saml-provider/SAMLADFS
    

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes

    This Pulumi package is based on the aws Terraform Provider.

    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.12.0 published on Wednesday, Nov 29, 2023 by Pulumi