Alibaba Cloud v3.77.0 published on Friday, May 2, 2025 by Pulumi
alicloud.ims.getOidcProviders
Explore with Pulumi AI
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.
- Name
Regex string - A regex string to filter results by Group Metric Rule name.
- Output
File string - File name where to save data source results (after running
pulumi preview
).
- Ids []string
- A list of Oidc Provider IDs.
- Name
Regex string - A regex string to filter results by Group Metric Rule name.
- Output
File string - File name where to save data source results (after running
pulumi preview
).
- ids List<String>
- A list of Oidc Provider IDs.
- name
Regex String - A regex string to filter results by Group Metric Rule name.
- output
File String - File name where to save data source results (after running
pulumi preview
).
- ids string[]
- A list of Oidc Provider IDs.
- name
Regex string - A regex string to filter results by Group Metric Rule name.
- output
File 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.
- name
Regex String - A regex string to filter results by Group Metric Rule name.
- output
File 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.
Ali Cloud. Ims. Outputs. Get Oidc Providers Provider> - A list of Oidc Provider Entries. Each element contains the following attributes:
- Name
Regex string - Output
File 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
[]Get
Oidc Providers Provider - A list of Oidc Provider Entries. Each element contains the following attributes:
- Name
Regex string - Output
File 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<Get
Oidc Providers Provider> - A list of Oidc Provider Entries. Each element contains the following attributes:
- name
Regex String - output
File 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
Get
Oidc Providers Provider[] - A list of Oidc Provider Entries. Each element contains the following attributes:
- name
Regex string - output
File 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[Get
Oidc Providers Provider] - 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:
- name
Regex String - output
File String
Supporting Types
GetOidcProvidersProvider
- Arn string
- ARN of OIDC identity provider.
- Client
Ids List<string> - Client ID.
- Create
Time 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.
- Issuance
Limit intTime - 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 string - The issuer URL of the OIDC identity provider.
- Oidc
Provider stringName - The name of the OIDC identity provider.
- Update
Time string - Modification Time (UTC time).
- Arn string
- ARN of OIDC identity provider.
- Client
Ids []string - Client ID.
- Create
Time 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.
- Issuance
Limit intTime - 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 string - The issuer URL of the OIDC identity provider.
- Oidc
Provider stringName - The name of the OIDC identity provider.
- Update
Time string - Modification Time (UTC time).
- arn String
- ARN of OIDC identity provider.
- client
Ids List<String> - Client ID.
- create
Time 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.
- issuance
Limit IntegerTime - 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 String - The issuer URL of the OIDC identity provider.
- oidc
Provider StringName - The name of the OIDC identity provider.
- update
Time String - Modification Time (UTC time).
- arn string
- ARN of OIDC identity provider.
- client
Ids string[] - Client ID.
- create
Time 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.
- issuance
Limit numberTime - 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 string - The issuer URL of the OIDC identity provider.
- oidc
Provider stringName - The name of the OIDC identity provider.
- update
Time 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_ inttime - 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_ strname - The name of the OIDC identity provider.
- update_
time str - Modification Time (UTC time).
- arn String
- ARN of OIDC identity provider.
- client
Ids List<String> - Client ID.
- create
Time 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.
- issuance
Limit NumberTime - 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 String - The issuer URL of the OIDC identity provider.
- oidc
Provider StringName - The name of the OIDC identity provider.
- update
Time 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.