1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. ims
  5. OidcProvider
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

alicloud.ims.OidcProvider

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

    Provides a IMS Oidc Provider resource. OpenID Connect Provider.

    For information about IMS Oidc Provider and how to use it, see What is Oidc Provider.

    NOTE: Available since v1.210.0.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const config = new pulumi.Config();
    const name = config.get("name") || "terraform-example";
    const oidcProviderName = config.get("oidcProviderName") || "amp-resource-example-oidc-provider";
    const _default = new alicloud.ims.OidcProvider("default", {
        description: oidcProviderName,
        issuerUrl: "https://oauth.aliyun.com",
        fingerprints: ["902ef2deeb3c5b13ea4c3d5193629309e231ae55"],
        issuanceLimitTime: 12,
        oidcProviderName: name,
        clientIds: [
            "123",
            "456",
        ],
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "terraform-example"
    oidc_provider_name = config.get("oidcProviderName")
    if oidc_provider_name is None:
        oidc_provider_name = "amp-resource-example-oidc-provider"
    default = alicloud.ims.OidcProvider("default",
        description=oidc_provider_name,
        issuer_url="https://oauth.aliyun.com",
        fingerprints=["902ef2deeb3c5b13ea4c3d5193629309e231ae55"],
        issuance_limit_time=12,
        oidc_provider_name=name,
        client_ids=[
            "123",
            "456",
        ])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ims"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		name := "terraform-example"
    		if param := cfg.Get("name"); param != "" {
    			name = param
    		}
    		oidcProviderName := "amp-resource-example-oidc-provider"
    		if param := cfg.Get("oidcProviderName"); param != "" {
    			oidcProviderName = param
    		}
    		_, err := ims.NewOidcProvider(ctx, "default", &ims.OidcProviderArgs{
    			Description: pulumi.String(oidcProviderName),
    			IssuerUrl:   pulumi.String("https://oauth.aliyun.com"),
    			Fingerprints: pulumi.StringArray{
    				pulumi.String("902ef2deeb3c5b13ea4c3d5193629309e231ae55"),
    			},
    			IssuanceLimitTime: pulumi.Int(12),
    			OidcProviderName:  pulumi.String(name),
    			ClientIds: pulumi.StringArray{
    				pulumi.String("123"),
    				pulumi.String("456"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var name = config.Get("name") ?? "terraform-example";
        var oidcProviderName = config.Get("oidcProviderName") ?? "amp-resource-example-oidc-provider";
        var @default = new AliCloud.Ims.OidcProvider("default", new()
        {
            Description = oidcProviderName,
            IssuerUrl = "https://oauth.aliyun.com",
            Fingerprints = new[]
            {
                "902ef2deeb3c5b13ea4c3d5193629309e231ae55",
            },
            IssuanceLimitTime = 12,
            OidcProviderName = name,
            ClientIds = new[]
            {
                "123",
                "456",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.ims.OidcProvider;
    import com.pulumi.alicloud.ims.OidcProviderArgs;
    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) {
            final var config = ctx.config();
            final var name = config.get("name").orElse("terraform-example");
            final var oidcProviderName = config.get("oidcProviderName").orElse("amp-resource-example-oidc-provider");
            var default_ = new OidcProvider("default", OidcProviderArgs.builder()
                .description(oidcProviderName)
                .issuerUrl("https://oauth.aliyun.com")
                .fingerprints("902ef2deeb3c5b13ea4c3d5193629309e231ae55")
                .issuanceLimitTime("12")
                .oidcProviderName(name)
                .clientIds(            
                    "123",
                    "456")
                .build());
    
        }
    }
    
    configuration:
      name:
        type: string
        default: terraform-example
      oidcProviderName:
        type: string
        default: amp-resource-example-oidc-provider
    resources:
      default:
        type: alicloud:ims:OidcProvider
        properties:
          description: ${oidcProviderName}
          issuerUrl: https://oauth.aliyun.com
          fingerprints:
            - 902ef2deeb3c5b13ea4c3d5193629309e231ae55
          issuanceLimitTime: '12'
          oidcProviderName: ${name}
          clientIds:
            - '123'
            - '456'
    

    Create OidcProvider Resource

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

    Constructor syntax

    new OidcProvider(name: string, args: OidcProviderArgs, opts?: CustomResourceOptions);
    @overload
    def OidcProvider(resource_name: str,
                     args: OidcProviderArgs,
                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def OidcProvider(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     issuer_url: Optional[str] = None,
                     oidc_provider_name: Optional[str] = None,
                     client_ids: Optional[Sequence[str]] = None,
                     description: Optional[str] = None,
                     fingerprints: Optional[Sequence[str]] = None,
                     issuance_limit_time: Optional[int] = None)
    func NewOidcProvider(ctx *Context, name string, args OidcProviderArgs, opts ...ResourceOption) (*OidcProvider, error)
    public OidcProvider(string name, OidcProviderArgs args, CustomResourceOptions? opts = null)
    public OidcProvider(String name, OidcProviderArgs args)
    public OidcProvider(String name, OidcProviderArgs args, CustomResourceOptions options)
    
    type: alicloud:ims:OidcProvider
    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 OidcProviderArgs
    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 OidcProviderArgs
    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 OidcProviderArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args OidcProviderArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args OidcProviderArgs
    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 oidcProviderResource = new AliCloud.Ims.OidcProvider("oidcProviderResource", new()
    {
        IssuerUrl = "string",
        OidcProviderName = "string",
        ClientIds = new[]
        {
            "string",
        },
        Description = "string",
        Fingerprints = new[]
        {
            "string",
        },
        IssuanceLimitTime = 0,
    });
    
    example, err := ims.NewOidcProvider(ctx, "oidcProviderResource", &ims.OidcProviderArgs{
    	IssuerUrl:        pulumi.String("string"),
    	OidcProviderName: pulumi.String("string"),
    	ClientIds: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Description: pulumi.String("string"),
    	Fingerprints: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	IssuanceLimitTime: pulumi.Int(0),
    })
    
    var oidcProviderResource = new OidcProvider("oidcProviderResource", OidcProviderArgs.builder()
        .issuerUrl("string")
        .oidcProviderName("string")
        .clientIds("string")
        .description("string")
        .fingerprints("string")
        .issuanceLimitTime(0)
        .build());
    
    oidc_provider_resource = alicloud.ims.OidcProvider("oidcProviderResource",
        issuer_url="string",
        oidc_provider_name="string",
        client_ids=["string"],
        description="string",
        fingerprints=["string"],
        issuance_limit_time=0)
    
    const oidcProviderResource = new alicloud.ims.OidcProvider("oidcProviderResource", {
        issuerUrl: "string",
        oidcProviderName: "string",
        clientIds: ["string"],
        description: "string",
        fingerprints: ["string"],
        issuanceLimitTime: 0,
    });
    
    type: alicloud:ims:OidcProvider
    properties:
        clientIds:
            - string
        description: string
        fingerprints:
            - string
        issuanceLimitTime: 0
        issuerUrl: string
        oidcProviderName: string
    

    OidcProvider Resource Properties

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

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The OidcProvider resource accepts the following input properties:

    IssuerUrl string
    The issuer URL of the OIDC identity provider.
    OidcProviderName string
    The name of the OIDC identity provider.
    ClientIds List<string>
    Client ID.
    Description string
    Description of OIDC identity provider.
    Fingerprints List<string>
    The authentication fingerprint of the HTTPS CA certificate.
    IssuanceLimitTime int
    The earliest time when an external IdP is allowed to issue an ID Token. If the iat field in the ID Token is greater than the current time, the request is rejected.Unit: hours. Value range: 1~168.
    IssuerUrl string
    The issuer URL of the OIDC identity provider.
    OidcProviderName string
    The name of the OIDC identity provider.
    ClientIds []string
    Client ID.
    Description string
    Description of OIDC identity provider.
    Fingerprints []string
    The authentication fingerprint of the HTTPS CA certificate.
    IssuanceLimitTime int
    The earliest time when an external IdP is allowed to issue an ID Token. If the iat field in the ID Token is greater than the current time, the request is rejected.Unit: hours. Value range: 1~168.
    issuerUrl String
    The issuer URL of the OIDC identity provider.
    oidcProviderName String
    The name of the OIDC identity provider.
    clientIds List<String>
    Client ID.
    description String
    Description of OIDC identity provider.
    fingerprints List<String>
    The authentication fingerprint of the HTTPS CA certificate.
    issuanceLimitTime Integer
    The earliest time when an external IdP is allowed to issue an ID Token. If the iat field in the ID Token is greater than the current time, the request is rejected.Unit: hours. Value range: 1~168.
    issuerUrl string
    The issuer URL of the OIDC identity provider.
    oidcProviderName string
    The name of the OIDC identity provider.
    clientIds string[]
    Client ID.
    description string
    Description of OIDC identity provider.
    fingerprints string[]
    The authentication fingerprint of the HTTPS CA certificate.
    issuanceLimitTime number
    The earliest time when an external IdP is allowed to issue an ID Token. If the iat field in the ID Token is greater than the current time, the request is rejected.Unit: hours. Value range: 1~168.
    issuer_url str
    The issuer URL of the OIDC identity provider.
    oidc_provider_name str
    The name of the OIDC identity provider.
    client_ids Sequence[str]
    Client ID.
    description str
    Description of OIDC identity provider.
    fingerprints Sequence[str]
    The authentication fingerprint of the HTTPS CA certificate.
    issuance_limit_time int
    The earliest time when an external IdP is allowed to issue an ID Token. If the iat field in the ID Token is greater than the current time, the request is rejected.Unit: hours. Value range: 1~168.
    issuerUrl String
    The issuer URL of the OIDC identity provider.
    oidcProviderName String
    The name of the OIDC identity provider.
    clientIds List<String>
    Client ID.
    description String
    Description of OIDC identity provider.
    fingerprints List<String>
    The authentication fingerprint of the HTTPS CA certificate.
    issuanceLimitTime Number
    The earliest time when an external IdP is allowed to issue an ID Token. If the iat field in the ID Token is greater than the current time, the request is rejected.Unit: hours. Value range: 1~168.

    Outputs

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

    CreateTime string
    Creation Time (UTC time).
    Id string
    The provider-assigned unique ID for this managed resource.
    CreateTime string
    Creation Time (UTC time).
    Id string
    The provider-assigned unique ID for this managed resource.
    createTime String
    Creation Time (UTC time).
    id String
    The provider-assigned unique ID for this managed resource.
    createTime string
    Creation Time (UTC time).
    id string
    The provider-assigned unique ID for this managed resource.
    create_time str
    Creation Time (UTC time).
    id str
    The provider-assigned unique ID for this managed resource.
    createTime String
    Creation Time (UTC time).
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing OidcProvider Resource

    Get an existing OidcProvider 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?: OidcProviderState, opts?: CustomResourceOptions): OidcProvider
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            client_ids: Optional[Sequence[str]] = None,
            create_time: Optional[str] = None,
            description: Optional[str] = None,
            fingerprints: Optional[Sequence[str]] = None,
            issuance_limit_time: Optional[int] = None,
            issuer_url: Optional[str] = None,
            oidc_provider_name: Optional[str] = None) -> OidcProvider
    func GetOidcProvider(ctx *Context, name string, id IDInput, state *OidcProviderState, opts ...ResourceOption) (*OidcProvider, error)
    public static OidcProvider Get(string name, Input<string> id, OidcProviderState? state, CustomResourceOptions? opts = null)
    public static OidcProvider get(String name, Output<String> id, OidcProviderState 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:
    ClientIds List<string>
    Client ID.
    CreateTime string
    Creation Time (UTC time).
    Description string
    Description of OIDC identity provider.
    Fingerprints List<string>
    The authentication fingerprint of the HTTPS CA certificate.
    IssuanceLimitTime int
    The earliest time when an external IdP is allowed to issue an ID Token. If the iat field in the ID Token is greater than the current time, the request is rejected.Unit: hours. Value range: 1~168.
    IssuerUrl string
    The issuer URL of the OIDC identity provider.
    OidcProviderName string
    The name of the OIDC identity provider.
    ClientIds []string
    Client ID.
    CreateTime string
    Creation Time (UTC time).
    Description string
    Description of OIDC identity provider.
    Fingerprints []string
    The authentication fingerprint of the HTTPS CA certificate.
    IssuanceLimitTime int
    The earliest time when an external IdP is allowed to issue an ID Token. If the iat field in the ID Token is greater than the current time, the request is rejected.Unit: hours. Value range: 1~168.
    IssuerUrl string
    The issuer URL of the OIDC identity provider.
    OidcProviderName string
    The name of the OIDC identity provider.
    clientIds List<String>
    Client ID.
    createTime String
    Creation Time (UTC time).
    description String
    Description of OIDC identity provider.
    fingerprints List<String>
    The authentication fingerprint of the HTTPS CA certificate.
    issuanceLimitTime Integer
    The earliest time when an external IdP is allowed to issue an ID Token. If the iat field in the ID Token is greater than the current time, the request is rejected.Unit: hours. Value range: 1~168.
    issuerUrl String
    The issuer URL of the OIDC identity provider.
    oidcProviderName String
    The name of the OIDC identity provider.
    clientIds string[]
    Client ID.
    createTime string
    Creation Time (UTC time).
    description string
    Description of OIDC identity provider.
    fingerprints string[]
    The authentication fingerprint of the HTTPS CA certificate.
    issuanceLimitTime number
    The earliest time when an external IdP is allowed to issue an ID Token. If the iat field in the ID Token is greater than the current time, the request is rejected.Unit: hours. Value range: 1~168.
    issuerUrl string
    The issuer URL of the OIDC identity provider.
    oidcProviderName string
    The name of the OIDC identity provider.
    client_ids Sequence[str]
    Client ID.
    create_time str
    Creation Time (UTC time).
    description str
    Description of OIDC identity provider.
    fingerprints Sequence[str]
    The authentication fingerprint of the HTTPS CA certificate.
    issuance_limit_time int
    The earliest time when an external IdP is allowed to issue an ID Token. If the iat field in the ID Token is greater than the current time, the request is rejected.Unit: hours. Value range: 1~168.
    issuer_url str
    The issuer URL of the OIDC identity provider.
    oidc_provider_name str
    The name of the OIDC identity provider.
    clientIds List<String>
    Client ID.
    createTime String
    Creation Time (UTC time).
    description String
    Description of OIDC identity provider.
    fingerprints List<String>
    The authentication fingerprint of the HTTPS CA certificate.
    issuanceLimitTime Number
    The earliest time when an external IdP is allowed to issue an ID Token. If the iat field in the ID Token is greater than the current time, the request is rejected.Unit: hours. Value range: 1~168.
    issuerUrl String
    The issuer URL of the OIDC identity provider.
    oidcProviderName String
    The name of the OIDC identity provider.

    Import

    IMS Oidc Provider can be imported using the id, e.g.

    $ pulumi import alicloud:ims/oidcProvider:OidcProvider example <id>
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi