Alibaba Cloud

Pulumi Official
Package maintained by Pulumi
v3.28.0 published on Tuesday, Aug 16, 2022 by Pulumi

getDirectories

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-shanghai And us-west-1 Region

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var ids = Output.Create(AliCloud.CloudSso.GetDirectories.InvokeAsync(new AliCloud.CloudSso.GetDirectoriesArgs
        {
            Ids = 
            {
                "example_id",
            },
        }));
        this.CloudSsoDirectoryId1 = ids.Apply(ids => ids.Directories?[0]?.Id);
        var nameRegex = Output.Create(AliCloud.CloudSso.GetDirectories.InvokeAsync(new AliCloud.CloudSso.GetDirectoriesArgs
        {
            NameRegex = "^my-Directory",
        }));
        this.CloudSsoDirectoryId2 = nameRegex.Apply(nameRegex => nameRegex.Directories?[0]?.Id);
    }

    [Output("cloudSsoDirectoryId1")]
    public Output<string> CloudSsoDirectoryId1 { get; set; }
    [Output("cloudSsoDirectoryId2")]
    public Output<string> CloudSsoDirectoryId2 { get; set; }
}
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
	})
}
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.applyValue(getDirectoriesResult -> getDirectoriesResult.directories()[0].id()));
        final var nameRegex = CloudssoFunctions.getDirectories(GetDirectoriesArgs.builder()
            .nameRegex("^my-Directory")
            .build());

        ctx.export("cloudSsoDirectoryId2", nameRegex.applyValue(getDirectoriesResult -> getDirectoriesResult.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)
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);
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)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: alicloud:cloudsso/getDirectories:getDirectories
  Arguments:
    # Arguments dictionary

The following arguments are supported:

EnableDetails bool

Default to false. Set it to true can output more details about resource attributes.

Ids List<string>

A list of Directory IDs.

NameRegex string

A regex string to filter results by Directory name.

OutputFile string
EnableDetails bool

Default to false. Set it to true can output more details about resource attributes.

Ids []string

A list of Directory IDs.

NameRegex string

A regex string to filter results by Directory name.

OutputFile string
enableDetails Boolean

Default to false. Set it to true can output more details about resource attributes.

ids List<String>

A list of Directory IDs.

nameRegex String

A regex string to filter results by Directory name.

outputFile String
enableDetails boolean

Default to false. Set it to true can output more details about resource attributes.

ids string[]

A list of Directory IDs.

nameRegex string

A regex string to filter results by Directory name.

outputFile string
enable_details bool

Default to false. Set it to true can 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
enableDetails Boolean

Default to false. Set it to true can output more details about resource attributes.

ids List<String>

A list of Directory IDs.

nameRegex String

A regex string to filter results by Directory name.

outputFile String

getDirectories Result

The following output properties are available:

Directories List<Pulumi.AliCloud.CloudSso.Outputs.GetDirectoriesDirectory>
Id string

The provider-assigned unique ID for this managed resource.

Ids List<string>
Names List<string>
EnableDetails bool
NameRegex string
OutputFile string
Directories []GetDirectoriesDirectory
Id string

The provider-assigned unique ID for this managed resource.

Ids []string
Names []string
EnableDetails bool
NameRegex string
OutputFile string
directories List<GetDirectoriesDirectory>
id String

The provider-assigned unique ID for this managed resource.

ids List<String>
names List<String>
enableDetails Boolean
nameRegex String
outputFile String
directories GetDirectoriesDirectory[]
id string

The provider-assigned unique ID for this managed resource.

ids string[]
names string[]
enableDetails boolean
nameRegex string
outputFile string
directories Sequence[GetDirectoriesDirectory]
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>
enableDetails Boolean
nameRegex String
outputFile String

Supporting Types

GetDirectoriesDirectory

CreateTime string

Saml identifies the creation time of the provider configuration.

DirectoryId string

The DirectoryId of the CloudSSO directory.

DirectoryName string

The name of the CloudSSO directory.

Id string

The ID of the Directory.

MfaAuthenticationStatus string

The mfa authentication status. Valid values: Enabled or Disabled. Default to Disabled.

Region string

The Region of the CloudSSO directory.

SamlIdentityProviderConfigurations List<Pulumi.AliCloud.CloudSso.Inputs.GetDirectoriesDirectorySamlIdentityProviderConfiguration>

The saml identity provider configuration.

ScimSynchronizationStatus string

The scim synchronization status. Valid values: Enabled or Disabled. Default to Disabled.

Tasks List<Pulumi.AliCloud.CloudSso.Inputs.GetDirectoriesDirectoryTask>

Asynchronous Task Information Array.

CreateTime string

Saml identifies the creation time of the provider configuration.

DirectoryId string

The DirectoryId of the CloudSSO directory.

DirectoryName string

The name of the CloudSSO directory.

Id string

The ID of the Directory.

MfaAuthenticationStatus string

The mfa authentication status. Valid values: Enabled or Disabled. Default to Disabled.

Region string

The Region of the CloudSSO directory.

SamlIdentityProviderConfigurations []GetDirectoriesDirectorySamlIdentityProviderConfiguration

The saml identity provider configuration.

ScimSynchronizationStatus string

The scim synchronization status. Valid values: Enabled or Disabled. Default to Disabled.

Tasks []GetDirectoriesDirectoryTask

Asynchronous Task Information Array.

createTime String

Saml identifies the creation time of the provider configuration.

directoryId String

The DirectoryId of the CloudSSO directory.

directoryName String

The name of the CloudSSO directory.

id String

The ID of the Directory.

mfaAuthenticationStatus String

The mfa authentication status. Valid values: Enabled or Disabled. Default to Disabled.

region String

The Region of the CloudSSO directory.

samlIdentityProviderConfigurations List<GetDirectoriesDirectorySamlIdentityProviderConfiguration>

The saml identity provider configuration.

scimSynchronizationStatus String

The scim synchronization status. Valid values: Enabled or Disabled. Default to Disabled.

tasks List<GetDirectoriesDirectoryTask>

Asynchronous Task Information Array.

createTime string

Saml identifies the creation time of the provider configuration.

directoryId string

The DirectoryId of the CloudSSO directory.

directoryName string

The name of the CloudSSO directory.

id string

The ID of the Directory.

mfaAuthenticationStatus string

The mfa authentication status. Valid values: Enabled or Disabled. Default to Disabled.

region string

The Region of the CloudSSO directory.

samlIdentityProviderConfigurations GetDirectoriesDirectorySamlIdentityProviderConfiguration[]

The saml identity provider configuration.

scimSynchronizationStatus string

The scim synchronization status. Valid values: Enabled or Disabled. Default to Disabled.

tasks GetDirectoriesDirectoryTask[]

Asynchronous Task Information Array.

create_time str

Saml identifies the creation time of the provider configuration.

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_status str

The mfa authentication status. Valid values: Enabled or Disabled. Default to Disabled.

region str

The Region of the CloudSSO directory.

saml_identity_provider_configurations Sequence[GetDirectoriesDirectorySamlIdentityProviderConfiguration]

The saml identity provider configuration.

scim_synchronization_status str

The scim synchronization status. Valid values: Enabled or Disabled. Default to Disabled.

tasks Sequence[GetDirectoriesDirectoryTask]

Asynchronous Task Information Array.

createTime String

Saml identifies the creation time of the provider configuration.

directoryId String

The DirectoryId of the CloudSSO directory.

directoryName String

The name of the CloudSSO directory.

id String

The ID of the Directory.

mfaAuthenticationStatus String

The mfa authentication status. Valid values: Enabled or Disabled. Default to Disabled.

region String

The Region of the CloudSSO directory.

samlIdentityProviderConfigurations List<Property Map>

The saml identity provider configuration.

scimSynchronizationStatus String

The scim synchronization status. Valid values: Enabled or Disabled. Default to Disabled.

tasks List<Property Map>

Asynchronous Task Information Array.

GetDirectoriesDirectorySamlIdentityProviderConfiguration

CreateTime string

Saml identifies the creation time of the provider configuration.

EncodedMetadataDocument string

Base64 encoded IdP metadata document.

EntityId string

SAML IdPEntityID.

LoginUrl string

SAML IdP http-post Binding address.

SsoStatus string

SAML SSO login enabled status. Valid values: Enabled or Disabled. Default to Disabled.

CreateTime string

Saml identifies the creation time of the provider configuration.

EncodedMetadataDocument string

Base64 encoded IdP metadata document.

EntityId string

SAML IdPEntityID.

LoginUrl string

SAML IdP http-post Binding address.

SsoStatus string

SAML SSO login enabled status. Valid values: Enabled or Disabled. Default to Disabled.

createTime String

Saml identifies the creation time of the provider configuration.

encodedMetadataDocument String

Base64 encoded IdP metadata document.

entityId String

SAML IdPEntityID.

loginUrl String

SAML IdP http-post Binding address.

ssoStatus String

SAML SSO login enabled status. Valid values: Enabled or Disabled. Default to Disabled.

createTime string

Saml identifies the creation time of the provider configuration.

encodedMetadataDocument string

Base64 encoded IdP metadata document.

entityId string

SAML IdPEntityID.

loginUrl string

SAML IdP http-post Binding address.

ssoStatus string

SAML SSO login enabled status. Valid values: Enabled or Disabled. Default to Disabled.

create_time str

Saml identifies the creation time of the provider configuration.

encoded_metadata_document str

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: Enabled or Disabled. Default to Disabled.

createTime String

Saml identifies the creation time of the provider configuration.

encodedMetadataDocument String

Base64 encoded IdP metadata document.

entityId String

SAML IdPEntityID.

loginUrl String

SAML IdP http-post Binding address.

ssoStatus String

SAML SSO login enabled status. Valid values: Enabled or Disabled. Default to Disabled.

GetDirectoriesDirectoryTask

AccessConfigurationId string

The ID of Access Configuration.

AccessConfigurationName string

The Name of Access Configuration.

EndTime string

The End Time of Task.

FailureReason string

the Reason for the Failure of the task.

PrincipalId string

The ID of Cloud SSO Identity.

PrincipalName string

The Name of Cloud SSO Identity.

PrincipalType string

The Type of Cloud SSO Identity.

StartTime string

The Start Time of Task.

Status string

The Task Status.

TargetId string

The Id of deploy target.

TargetName string

The Name of Deploy Target.

TargetPath string

The Path in RD of Deploy Target.

TargetType string

The Type of Deploy Target.

TaskId string

The ID of the Task.

TaskType string

The Type of the Task.

AccessConfigurationId string

The ID of Access Configuration.

AccessConfigurationName string

The Name of Access Configuration.

EndTime string

The End Time of Task.

FailureReason string

the Reason for the Failure of the task.

PrincipalId string

The ID of Cloud SSO Identity.

PrincipalName string

The Name of Cloud SSO Identity.

PrincipalType string

The Type of Cloud SSO Identity.

StartTime string

The Start Time of Task.

Status string

The Task Status.

TargetId string

The Id of deploy target.

TargetName string

The Name of Deploy Target.

TargetPath string

The Path in RD of Deploy Target.

TargetType string

The Type of Deploy Target.

TaskId string

The ID of the Task.

TaskType string

The Type of the Task.

accessConfigurationId String

The ID of Access Configuration.

accessConfigurationName String

The Name of Access Configuration.

endTime String

The End Time of Task.

failureReason String

the Reason for the Failure of the task.

principalId String

The ID of Cloud SSO Identity.

principalName String

The Name of Cloud SSO Identity.

principalType String

The Type of Cloud SSO Identity.

startTime String

The Start Time of Task.

status String

The Task Status.

targetId String

The Id of deploy target.

targetName String

The Name of Deploy Target.

targetPath String

The Path in RD of Deploy Target.

targetType String

The Type of Deploy Target.

taskId String

The ID of the Task.

taskType String

The Type of the Task.

accessConfigurationId string

The ID of Access Configuration.

accessConfigurationName string

The Name of Access Configuration.

endTime string

The End Time of Task.

failureReason string

the Reason for the Failure of the task.

principalId string

The ID of Cloud SSO Identity.

principalName string

The Name of Cloud SSO Identity.

principalType string

The Type of Cloud SSO Identity.

startTime string

The Start Time of Task.

status string

The Task Status.

targetId string

The Id of deploy target.

targetName string

The Name of Deploy Target.

targetPath string

The Path in RD of Deploy Target.

targetType string

The Type of Deploy Target.

taskId string

The ID of the Task.

taskType string

The Type of the Task.

access_configuration_id str

The ID of Access Configuration.

access_configuration_name str

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.

accessConfigurationId String

The ID of Access Configuration.

accessConfigurationName String

The Name of Access Configuration.

endTime String

The End Time of Task.

failureReason String

the Reason for the Failure of the task.

principalId String

The ID of Cloud SSO Identity.

principalName String

The Name of Cloud SSO Identity.

principalType String

The Type of Cloud SSO Identity.

startTime String

The Start Time of Task.

status String

The Task Status.

targetId String

The Id of deploy target.

targetName String

The Name of Deploy Target.

targetPath String

The Path in RD of Deploy Target.

targetType String

The Type of Deploy Target.

taskId String

The ID of the Task.

taskType String

The Type of the Task.

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.