1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. ims
  5. getOidcProviders
Alibaba Cloud v3.77.0 published on Friday, May 2, 2025 by Pulumi

alicloud.ims.getOidcProviders

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.77.0 published on Friday, May 2, 2025 by Pulumi

    This data source provides Ims Oidc Provider available to the user.What is Oidc Provider

    NOTE: Available since v1.248.0.

    Example 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 defaultOidcProvider = new alicloud.ims.OidcProvider("default", {
        description: oidcProviderName,
        issuerUrl: "https://oauth.aliyun.com",
        fingerprints: ["0BBFAB97059595E8D1EC48E89EB8657C0E5AAE71"],
        issuanceLimitTime: 12,
        oidcProviderName: oidcProviderName,
        clientIds: [
            "123",
            "456",
        ],
    });
    const _default = alicloud.ims.getOidcProvidersOutput({
        ids: [defaultOidcProvider.id],
    });
    export const alicloudImsOidcProviderExampleId = _default.apply(_default => _default.providers?.[0]?.id);
    
    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_oidc_provider = alicloud.ims.OidcProvider("default",
        description=oidc_provider_name,
        issuer_url="https://oauth.aliyun.com",
        fingerprints=["0BBFAB97059595E8D1EC48E89EB8657C0E5AAE71"],
        issuance_limit_time=12,
        oidc_provider_name=oidc_provider_name,
        client_ids=[
            "123",
            "456",
        ])
    default = alicloud.ims.get_oidc_providers_output(ids=[default_oidc_provider.id])
    pulumi.export("alicloudImsOidcProviderExampleId", default.providers[0].id)
    
    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
    }
    defaultOidcProvider, err := ims.NewOidcProvider(ctx, "default", &ims.OidcProviderArgs{
    Description: pulumi.String(oidcProviderName),
    IssuerUrl: pulumi.String("https://oauth.aliyun.com"),
    Fingerprints: pulumi.StringArray{
    pulumi.String("0BBFAB97059595E8D1EC48E89EB8657C0E5AAE71"),
    },
    IssuanceLimitTime: pulumi.Int(12),
    OidcProviderName: pulumi.String(oidcProviderName),
    ClientIds: pulumi.StringArray{
    pulumi.String("123"),
    pulumi.String("456"),
    },
    })
    if err != nil {
    return err
    }
    _default := ims.GetOidcProvidersOutput(ctx, ims.GetOidcProvidersOutputArgs{
    Ids: pulumi.StringArray{
    defaultOidcProvider.ID(),
    },
    }, nil);
    ctx.Export("alicloudImsOidcProviderExampleId", _default.ApplyT(func(_default ims.GetOidcProvidersResult) (*string, error) {
    return &default.Providers[0].Id, nil
    }).(pulumi.StringPtrOutput))
    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 defaultOidcProvider = new AliCloud.Ims.OidcProvider("default", new()
        {
            Description = oidcProviderName,
            IssuerUrl = "https://oauth.aliyun.com",
            Fingerprints = new[]
            {
                "0BBFAB97059595E8D1EC48E89EB8657C0E5AAE71",
            },
            IssuanceLimitTime = 12,
            OidcProviderName = oidcProviderName,
            ClientIds = new[]
            {
                "123",
                "456",
            },
        });
    
        var @default = AliCloud.Ims.GetOidcProviders.Invoke(new()
        {
            Ids = new[]
            {
                defaultOidcProvider.Id,
            },
        });
    
        return new Dictionary<string, object?>
        {
            ["alicloudImsOidcProviderExampleId"] = @default.Apply(@default => @default.Apply(getOidcProvidersResult => getOidcProvidersResult.Providers[0]?.Id)),
        };
    });
    
    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 com.pulumi.alicloud.ims.ImsFunctions;
    import com.pulumi.alicloud.ims.inputs.GetOidcProvidersArgs;
    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 defaultOidcProvider = new OidcProvider("defaultOidcProvider", OidcProviderArgs.builder()
                .description(oidcProviderName)
                .issuerUrl("https://oauth.aliyun.com")
                .fingerprints("0BBFAB97059595E8D1EC48E89EB8657C0E5AAE71")
                .issuanceLimitTime(12)
                .oidcProviderName(oidcProviderName)
                .clientIds(            
                    "123",
                    "456")
                .build());
    
            final var default = ImsFunctions.getOidcProviders(GetOidcProvidersArgs.builder()
                .ids(defaultOidcProvider.id())
                .build());
    
            ctx.export("alicloudImsOidcProviderExampleId", default_.applyValue(_default_ -> _default_.providers()[0].id()));
        }
    }
    
    configuration:
      name:
        type: string
        default: terraform-example
      oidcProviderName:
        type: string
        default: amp-resource-example-oidc-provider
    resources:
      defaultOidcProvider:
        type: alicloud:ims:OidcProvider
        name: default
        properties:
          description: ${oidcProviderName}
          issuerUrl: https://oauth.aliyun.com
          fingerprints:
            - 0BBFAB97059595E8D1EC48E89EB8657C0E5AAE71
          issuanceLimitTime: '12'
          oidcProviderName: ${oidcProviderName}
          clientIds:
            - '123'
            - '456'
    variables:
      default:
        fn::invoke:
          function: alicloud:ims:getOidcProviders
          arguments:
            ids:
              - ${defaultOidcProvider.id}
    outputs:
      alicloudImsOidcProviderExampleId: ${default.providers[0].id}
    

    Using getOidcProviders

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getOidcProviders(args: GetOidcProvidersArgs, opts?: InvokeOptions): Promise<GetOidcProvidersResult>
    function getOidcProvidersOutput(args: GetOidcProvidersOutputArgs, opts?: InvokeOptions): Output<GetOidcProvidersResult>
    def get_oidc_providers(ids: Optional[Sequence[str]] = None,
                           name_regex: Optional[str] = None,
                           output_file: Optional[str] = None,
                           opts: Optional[InvokeOptions] = None) -> GetOidcProvidersResult
    def get_oidc_providers_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                           name_regex: Optional[pulumi.Input[str]] = None,
                           output_file: Optional[pulumi.Input[str]] = None,
                           opts: Optional[InvokeOptions] = None) -> Output[GetOidcProvidersResult]
    func GetOidcProviders(ctx *Context, args *GetOidcProvidersArgs, opts ...InvokeOption) (*GetOidcProvidersResult, error)
    func GetOidcProvidersOutput(ctx *Context, args *GetOidcProvidersOutputArgs, opts ...InvokeOption) GetOidcProvidersResultOutput

    > Note: This function is named GetOidcProviders in the Go SDK.

    public static class GetOidcProviders 
    {
        public static Task<GetOidcProvidersResult> InvokeAsync(GetOidcProvidersArgs args, InvokeOptions? opts = null)
        public static Output<GetOidcProvidersResult> Invoke(GetOidcProvidersInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetOidcProvidersResult> getOidcProviders(GetOidcProvidersArgs args, InvokeOptions options)
    public static Output<GetOidcProvidersResult> getOidcProviders(GetOidcProvidersArgs args, InvokeOptions options)
    
    fn::invoke:
      function: alicloud:ims/getOidcProviders:getOidcProviders
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Ids List<string>
    A list of Oidc Provider IDs.
    NameRegex string
    A regex string to filter results by Group Metric Rule name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    Ids []string
    A list of Oidc Provider IDs.
    NameRegex string
    A regex string to filter results by Group Metric Rule name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    ids List<String>
    A list of Oidc Provider IDs.
    nameRegex String
    A regex string to filter results by Group Metric Rule name.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    ids string[]
    A list of Oidc Provider IDs.
    nameRegex string
    A regex string to filter results by Group Metric Rule name.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    ids Sequence[str]
    A list of Oidc Provider IDs.
    name_regex str
    A regex string to filter results by Group Metric Rule name.
    output_file str
    File name where to save data source results (after running pulumi preview).
    ids List<String>
    A list of Oidc Provider IDs.
    nameRegex String
    A regex string to filter results by Group Metric Rule name.
    outputFile String
    File name where to save data source results (after running pulumi preview).

    getOidcProviders Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    A list of Oidc Provider IDs.
    Names List<string>
    A list of name of Oidc Providers.
    Providers List<Pulumi.AliCloud.Ims.Outputs.GetOidcProvidersProvider>
    A list of Oidc Provider Entries. Each element contains the following attributes:
    NameRegex string
    OutputFile string
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    A list of Oidc Provider IDs.
    Names []string
    A list of name of Oidc Providers.
    Providers []GetOidcProvidersProvider
    A list of Oidc Provider Entries. Each element contains the following attributes:
    NameRegex string
    OutputFile string
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    A list of Oidc Provider IDs.
    names List<String>
    A list of name of Oidc Providers.
    providers List<GetOidcProvidersProvider>
    A list of Oidc Provider Entries. Each element contains the following attributes:
    nameRegex String
    outputFile String
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    A list of Oidc Provider IDs.
    names string[]
    A list of name of Oidc Providers.
    providers GetOidcProvidersProvider[]
    A list of Oidc Provider Entries. Each element contains the following attributes:
    nameRegex string
    outputFile string
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    A list of Oidc Provider IDs.
    names Sequence[str]
    A list of name of Oidc Providers.
    providers Sequence[GetOidcProvidersProvider]
    A list of Oidc Provider Entries. Each element contains the following attributes:
    name_regex str
    output_file str
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    A list of Oidc Provider IDs.
    names List<String>
    A list of name of Oidc Providers.
    providers List<Property Map>
    A list of Oidc Provider Entries. Each element contains the following attributes:
    nameRegex String
    outputFile String

    Supporting Types

    GetOidcProvidersProvider

    Arn string
    ARN of 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.
    Id string
    The ID of the resource supplied above.
    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.
    UpdateTime string
    Modification Time (UTC time).
    Arn string
    ARN of 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.
    Id string
    The ID of the resource supplied above.
    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.
    UpdateTime string
    Modification Time (UTC time).
    arn String
    ARN of 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.
    id String
    The ID of the resource supplied above.
    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.
    updateTime String
    Modification Time (UTC time).
    arn string
    ARN of 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.
    id string
    The ID of the resource supplied above.
    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.
    updateTime string
    Modification Time (UTC time).
    arn str
    ARN of 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.
    id str
    The ID of the resource supplied above.
    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.
    update_time str
    Modification Time (UTC time).
    arn String
    ARN of 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.
    id String
    The ID of the resource supplied above.
    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.
    updateTime String
    Modification Time (UTC time).

    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.77.0 published on Friday, May 2, 2025 by Pulumi