Alibaba Cloud v3.88.0 published on Saturday, Nov 1, 2025 by Pulumi
alicloud.cloudsso.getDirectories
Start a Neo task
Explain and create an alicloud.cloudsso.getDirectories resource
This data source provides the Cloud Sso Directories of the current Alibaba Cloud user.
NOTE: Available in v1.135.0+.
NOTE: Cloud SSO Only Support
cn-shanghaiAndus-west-1Region
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const ids = alicloud.cloudsso.getDirectories({
ids: ["example_id"],
});
export const cloudSsoDirectoryId1 = ids.then(ids => ids.directories?.[0]?.id);
const nameRegex = alicloud.cloudsso.getDirectories({
nameRegex: "^my-Directory",
});
export const cloudSsoDirectoryId2 = nameRegex.then(nameRegex => nameRegex.directories?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
ids = alicloud.cloudsso.get_directories(ids=["example_id"])
pulumi.export("cloudSsoDirectoryId1", ids.directories[0].id)
name_regex = alicloud.cloudsso.get_directories(name_regex="^my-Directory")
pulumi.export("cloudSsoDirectoryId2", name_regex.directories[0].id)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cloudsso"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
ids, err := cloudsso.GetDirectories(ctx, &cloudsso.GetDirectoriesArgs{
Ids: []string{
"example_id",
},
}, nil)
if err != nil {
return err
}
ctx.Export("cloudSsoDirectoryId1", ids.Directories[0].Id)
nameRegex, err := cloudsso.GetDirectories(ctx, &cloudsso.GetDirectoriesArgs{
NameRegex: pulumi.StringRef("^my-Directory"),
}, nil)
if err != nil {
return err
}
ctx.Export("cloudSsoDirectoryId2", nameRegex.Directories[0].Id)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var ids = AliCloud.CloudSso.GetDirectories.Invoke(new()
{
Ids = new[]
{
"example_id",
},
});
var nameRegex = AliCloud.CloudSso.GetDirectories.Invoke(new()
{
NameRegex = "^my-Directory",
});
return new Dictionary<string, object?>
{
["cloudSsoDirectoryId1"] = ids.Apply(getDirectoriesResult => getDirectoriesResult.Directories[0]?.Id),
["cloudSsoDirectoryId2"] = nameRegex.Apply(getDirectoriesResult => getDirectoriesResult.Directories[0]?.Id),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.cloudsso.CloudssoFunctions;
import com.pulumi.alicloud.cloudsso.inputs.GetDirectoriesArgs;
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 ids = CloudssoFunctions.getDirectories(GetDirectoriesArgs.builder()
.ids("example_id")
.build());
ctx.export("cloudSsoDirectoryId1", ids.directories()[0].id());
final var nameRegex = CloudssoFunctions.getDirectories(GetDirectoriesArgs.builder()
.nameRegex("^my-Directory")
.build());
ctx.export("cloudSsoDirectoryId2", nameRegex.directories()[0].id());
}
}
variables:
ids:
fn::invoke:
function: alicloud:cloudsso:getDirectories
arguments:
ids:
- example_id
nameRegex:
fn::invoke:
function: alicloud:cloudsso:getDirectories
arguments:
nameRegex: ^my-Directory
outputs:
cloudSsoDirectoryId1: ${ids.directories[0].id}
cloudSsoDirectoryId2: ${nameRegex.directories[0].id}
Using getDirectories
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 getDirectories(args: GetDirectoriesArgs, opts?: InvokeOptions): Promise<GetDirectoriesResult>
function getDirectoriesOutput(args: GetDirectoriesOutputArgs, opts?: InvokeOptions): Output<GetDirectoriesResult>def get_directories(enable_details: Optional[bool] = None,
ids: Optional[Sequence[str]] = None,
name_regex: Optional[str] = None,
output_file: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetDirectoriesResult
def get_directories_output(enable_details: Optional[pulumi.Input[bool]] = None,
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[GetDirectoriesResult]func GetDirectories(ctx *Context, args *GetDirectoriesArgs, opts ...InvokeOption) (*GetDirectoriesResult, error)
func GetDirectoriesOutput(ctx *Context, args *GetDirectoriesOutputArgs, opts ...InvokeOption) GetDirectoriesResultOutput> Note: This function is named GetDirectories in the Go SDK.
public static class GetDirectories
{
public static Task<GetDirectoriesResult> InvokeAsync(GetDirectoriesArgs args, InvokeOptions? opts = null)
public static Output<GetDirectoriesResult> Invoke(GetDirectoriesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetDirectoriesResult> getDirectories(GetDirectoriesArgs args, InvokeOptions options)
public static Output<GetDirectoriesResult> getDirectories(GetDirectoriesArgs args, InvokeOptions options)
fn::invoke:
function: alicloud:cloudsso/getDirectories:getDirectories
arguments:
# arguments dictionaryThe following arguments are supported:
- Enable
Details bool - Default to
false. Set it totruecan output more details about resource attributes. - Ids List<string>
- A list of Directory IDs.
- Name
Regex string - A regex string to filter results by Directory name.
- Output
File string - File name where to save data source results (after running
pulumi preview).
- Enable
Details bool - Default to
false. Set it totruecan output more details about resource attributes. - Ids []string
- A list of Directory IDs.
- Name
Regex string - A regex string to filter results by Directory name.
- Output
File string - File name where to save data source results (after running
pulumi preview).
- enable
Details Boolean - Default to
false. Set it totruecan output more details about resource attributes. - ids List<String>
- A list of Directory IDs.
- name
Regex String - A regex string to filter results by Directory name.
- output
File String - File name where to save data source results (after running
pulumi preview).
- enable
Details boolean - Default to
false. Set it totruecan output more details about resource attributes. - ids string[]
- A list of Directory IDs.
- name
Regex string - A regex string to filter results by Directory name.
- output
File string - File name where to save data source results (after running
pulumi preview).
- enable_
details bool - Default to
false. Set it totruecan output more details about resource attributes. - ids Sequence[str]
- A list of Directory IDs.
- name_
regex str - A regex string to filter results by Directory name.
- output_
file str - File name where to save data source results (after running
pulumi preview).
- enable
Details Boolean - Default to
false. Set it totruecan output more details about resource attributes. - ids List<String>
- A list of Directory IDs.
- name
Regex String - A regex string to filter results by Directory name.
- output
File String - File name where to save data source results (after running
pulumi preview).
getDirectories Result
The following output properties are available:
- Directories
List<Pulumi.
Ali Cloud. Cloud Sso. Outputs. Get Directories Directory> - Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Names List<string>
- Enable
Details bool - Name
Regex string - Output
File string
- Directories
[]Get
Directories Directory - Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Names []string
- Enable
Details bool - Name
Regex string - Output
File string
- directories
List<Get
Directories Directory> - id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- enable
Details Boolean - name
Regex String - output
File String
- directories
Get
Directories Directory[] - id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- names string[]
- enable
Details boolean - name
Regex string - output
File string
- directories
Sequence[Get
Directories Directory] - id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- names Sequence[str]
- enable_
details bool - name_
regex str - output_
file str
- directories List<Property Map>
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- enable
Details Boolean - name
Regex String - output
File String
Supporting Types
GetDirectoriesDirectory
- Create
Time string - The CreateTime of the CloudSSO directory.
- Directory
Id string - The DirectoryId of the CloudSSO directory.
- Directory
Name string - The name of the CloudSSO directory.
- Id string
- The ID of the Directory.
- Mfa
Authentication stringStatus - The mfa authentication status. Valid values:
EnabledorDisabled. Default toDisabled. - Region string
- The Region of the CloudSSO directory.
- Saml
Identity List<Pulumi.Provider Configurations Ali Cloud. Cloud Sso. Inputs. Get Directories Directory Saml Identity Provider Configuration> - The saml identity provider configuration.
- Scim
Synchronization stringStatus - The scim synchronization status. Valid values:
EnabledorDisabled. Default toDisabled. - Tasks
List<Pulumi.
Ali Cloud. Cloud Sso. Inputs. Get Directories Directory Task> - Asynchronous Task Information Array.
- Create
Time string - The CreateTime of the CloudSSO directory.
- Directory
Id string - The DirectoryId of the CloudSSO directory.
- Directory
Name string - The name of the CloudSSO directory.
- Id string
- The ID of the Directory.
- Mfa
Authentication stringStatus - The mfa authentication status. Valid values:
EnabledorDisabled. Default toDisabled. - Region string
- The Region of the CloudSSO directory.
- Saml
Identity []GetProvider Configurations Directories Directory Saml Identity Provider Configuration - The saml identity provider configuration.
- Scim
Synchronization stringStatus - The scim synchronization status. Valid values:
EnabledorDisabled. Default toDisabled. - Tasks
[]Get
Directories Directory Task - Asynchronous Task Information Array.
- create
Time String - The CreateTime of the CloudSSO directory.
- directory
Id String - The DirectoryId of the CloudSSO directory.
- directory
Name String - The name of the CloudSSO directory.
- id String
- The ID of the Directory.
- mfa
Authentication StringStatus - The mfa authentication status. Valid values:
EnabledorDisabled. Default toDisabled. - region String
- The Region of the CloudSSO directory.
- saml
Identity List<GetProvider Configurations Directories Directory Saml Identity Provider Configuration> - The saml identity provider configuration.
- scim
Synchronization StringStatus - The scim synchronization status. Valid values:
EnabledorDisabled. Default toDisabled. - tasks
List<Get
Directories Directory Task> - Asynchronous Task Information Array.
- create
Time string - The CreateTime of the CloudSSO directory.
- directory
Id string - The DirectoryId of the CloudSSO directory.
- directory
Name string - The name of the CloudSSO directory.
- id string
- The ID of the Directory.
- mfa
Authentication stringStatus - The mfa authentication status. Valid values:
EnabledorDisabled. Default toDisabled. - region string
- The Region of the CloudSSO directory.
- saml
Identity GetProvider Configurations Directories Directory Saml Identity Provider Configuration[] - The saml identity provider configuration.
- scim
Synchronization stringStatus - The scim synchronization status. Valid values:
EnabledorDisabled. Default toDisabled. - tasks
Get
Directories Directory Task[] - Asynchronous Task Information Array.
- create_
time str - The CreateTime of the CloudSSO directory.
- directory_
id str - The DirectoryId of the CloudSSO directory.
- directory_
name str - The name of the CloudSSO directory.
- id str
- The ID of the Directory.
- mfa_
authentication_ strstatus - The mfa authentication status. Valid values:
EnabledorDisabled. Default toDisabled. - region str
- The Region of the CloudSSO directory.
- saml_
identity_ Sequence[Getprovider_ configurations Directories Directory Saml Identity Provider Configuration] - The saml identity provider configuration.
- scim_
synchronization_ strstatus - The scim synchronization status. Valid values:
EnabledorDisabled. Default toDisabled. - tasks
Sequence[Get
Directories Directory Task] - Asynchronous Task Information Array.
- create
Time String - The CreateTime of the CloudSSO directory.
- directory
Id String - The DirectoryId of the CloudSSO directory.
- directory
Name String - The name of the CloudSSO directory.
- id String
- The ID of the Directory.
- mfa
Authentication StringStatus - The mfa authentication status. Valid values:
EnabledorDisabled. Default toDisabled. - region String
- The Region of the CloudSSO directory.
- saml
Identity List<Property Map>Provider Configurations - The saml identity provider configuration.
- scim
Synchronization StringStatus - The scim synchronization status. Valid values:
EnabledorDisabled. Default toDisabled. - tasks List<Property Map>
- Asynchronous Task Information Array.
GetDirectoriesDirectorySamlIdentityProviderConfiguration
- Create
Time string - Saml identifies the creation time of the provider configuration.
- Encoded
Metadata stringDocument - Base64 encoded IdP metadata document.
- Entity
Id string - SAML IdPEntityID.
- Login
Url string - SAML IdP http-post Binding address.
- Sso
Status string - SAML SSO login enabled status. Valid values:
EnabledorDisabled. Default toDisabled.
- Create
Time string - Saml identifies the creation time of the provider configuration.
- Encoded
Metadata stringDocument - Base64 encoded IdP metadata document.
- Entity
Id string - SAML IdPEntityID.
- Login
Url string - SAML IdP http-post Binding address.
- Sso
Status string - SAML SSO login enabled status. Valid values:
EnabledorDisabled. Default toDisabled.
- create
Time String - Saml identifies the creation time of the provider configuration.
- encoded
Metadata StringDocument - Base64 encoded IdP metadata document.
- entity
Id String - SAML IdPEntityID.
- login
Url String - SAML IdP http-post Binding address.
- sso
Status String - SAML SSO login enabled status. Valid values:
EnabledorDisabled. Default toDisabled.
- create
Time string - Saml identifies the creation time of the provider configuration.
- encoded
Metadata stringDocument - Base64 encoded IdP metadata document.
- entity
Id string - SAML IdPEntityID.
- login
Url string - SAML IdP http-post Binding address.
- sso
Status string - SAML SSO login enabled status. Valid values:
EnabledorDisabled. Default toDisabled.
- create_
time str - Saml identifies the creation time of the provider configuration.
- encoded_
metadata_ strdocument - Base64 encoded IdP metadata document.
- entity_
id str - SAML IdPEntityID.
- login_
url str - SAML IdP http-post Binding address.
- sso_
status str - SAML SSO login enabled status. Valid values:
EnabledorDisabled. Default toDisabled.
- create
Time String - Saml identifies the creation time of the provider configuration.
- encoded
Metadata StringDocument - Base64 encoded IdP metadata document.
- entity
Id String - SAML IdPEntityID.
- login
Url String - SAML IdP http-post Binding address.
- sso
Status String - SAML SSO login enabled status. Valid values:
EnabledorDisabled. Default toDisabled.
GetDirectoriesDirectoryTask
- Access
Configuration stringId - The ID of Access Configuration.
- Access
Configuration stringName - The Name of Access Configuration.
- End
Time string - The End Time of Task.
- Failure
Reason string - the Reason for the Failure of the task.
- Principal
Id string - The ID of Cloud SSO Identity.
- Principal
Name string - The Name of Cloud SSO Identity.
- Principal
Type string - The Type of Cloud SSO Identity.
- Start
Time string - The Start Time of Task.
- Status string
- The Task Status.
- Target
Id string - The Id of deploy target.
- Target
Name string - The Name of Deploy Target.
- Target
Path string - The Path in RD of Deploy Target.
- Target
Type string - The Type of Deploy Target.
- Task
Id string - The ID of the Task.
- Task
Type string - The Type of the Task.
- Access
Configuration stringId - The ID of Access Configuration.
- Access
Configuration stringName - The Name of Access Configuration.
- End
Time string - The End Time of Task.
- Failure
Reason string - the Reason for the Failure of the task.
- Principal
Id string - The ID of Cloud SSO Identity.
- Principal
Name string - The Name of Cloud SSO Identity.
- Principal
Type string - The Type of Cloud SSO Identity.
- Start
Time string - The Start Time of Task.
- Status string
- The Task Status.
- Target
Id string - The Id of deploy target.
- Target
Name string - The Name of Deploy Target.
- Target
Path string - The Path in RD of Deploy Target.
- Target
Type string - The Type of Deploy Target.
- Task
Id string - The ID of the Task.
- Task
Type string - The Type of the Task.
- access
Configuration StringId - The ID of Access Configuration.
- access
Configuration StringName - The Name of Access Configuration.
- end
Time String - The End Time of Task.
- failure
Reason String - the Reason for the Failure of the task.
- principal
Id String - The ID of Cloud SSO Identity.
- principal
Name String - The Name of Cloud SSO Identity.
- principal
Type String - The Type of Cloud SSO Identity.
- start
Time String - The Start Time of Task.
- status String
- The Task Status.
- target
Id String - The Id of deploy target.
- target
Name String - The Name of Deploy Target.
- target
Path String - The Path in RD of Deploy Target.
- target
Type String - The Type of Deploy Target.
- task
Id String - The ID of the Task.
- task
Type String - The Type of the Task.
- access
Configuration stringId - The ID of Access Configuration.
- access
Configuration stringName - The Name of Access Configuration.
- end
Time string - The End Time of Task.
- failure
Reason string - the Reason for the Failure of the task.
- principal
Id string - The ID of Cloud SSO Identity.
- principal
Name string - The Name of Cloud SSO Identity.
- principal
Type string - The Type of Cloud SSO Identity.
- start
Time string - The Start Time of Task.
- status string
- The Task Status.
- target
Id string - The Id of deploy target.
- target
Name string - The Name of Deploy Target.
- target
Path string - The Path in RD of Deploy Target.
- target
Type string - The Type of Deploy Target.
- task
Id string - The ID of the Task.
- task
Type string - The Type of the Task.
- access_
configuration_ strid - The ID of Access Configuration.
- access_
configuration_ strname - The Name of Access Configuration.
- end_
time str - The End Time of Task.
- failure_
reason str - the Reason for the Failure of the task.
- principal_
id str - The ID of Cloud SSO Identity.
- principal_
name str - The Name of Cloud SSO Identity.
- principal_
type str - The Type of Cloud SSO Identity.
- start_
time str - The Start Time of Task.
- status str
- The Task Status.
- target_
id str - The Id of deploy target.
- target_
name str - The Name of Deploy Target.
- target_
path str - The Path in RD of Deploy Target.
- target_
type str - The Type of Deploy Target.
- task_
id str - The ID of the Task.
- task_
type str - The Type of the Task.
- access
Configuration StringId - The ID of Access Configuration.
- access
Configuration StringName - The Name of Access Configuration.
- end
Time String - The End Time of Task.
- failure
Reason String - the Reason for the Failure of the task.
- principal
Id String - The ID of Cloud SSO Identity.
- principal
Name String - The Name of Cloud SSO Identity.
- principal
Type String - The Type of Cloud SSO Identity.
- start
Time String - The Start Time of Task.
- status String
- The Task Status.
- target
Id String - The Id of deploy target.
- target
Name String - The Name of Deploy Target.
- target
Path String - The Path in RD of Deploy Target.
- target
Type String - The Type of Deploy Target.
- task
Id String - The ID of the Task.
- task
Type String - The Type of the Task.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.
