1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. cloudsso
  5. getAccessConfigurations
Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi

alicloud.cloudsso.getAccessConfigurations

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi

    This data source provides the Cloud Sso Access Configurations of the current Alibaba Cloud user.

    NOTE: Available in v1.140.0+.

    NOTE: Cloud SSO Only Support cn-shanghai And us-west-1 Region

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const ids = alicloud.cloudsso.getAccessConfigurations({
        directoryId: "example_value",
        ids: [
            "example_value-1",
            "example_value-2",
        ],
    });
    export const cloudSsoAccessConfigurationId1 = ids.then(ids => ids.configurations?.[0]?.id);
    const nameRegex = alicloud.cloudsso.getAccessConfigurations({
        directoryId: "example_value",
        nameRegex: "^my-AccessConfiguration",
    });
    export const cloudSsoAccessConfigurationId2 = nameRegex.then(nameRegex => nameRegex.configurations?.[0]?.id);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    ids = alicloud.cloudsso.get_access_configurations(directory_id="example_value",
        ids=[
            "example_value-1",
            "example_value-2",
        ])
    pulumi.export("cloudSsoAccessConfigurationId1", ids.configurations[0].id)
    name_regex = alicloud.cloudsso.get_access_configurations(directory_id="example_value",
        name_regex="^my-AccessConfiguration")
    pulumi.export("cloudSsoAccessConfigurationId2", name_regex.configurations[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.GetAccessConfigurations(ctx, &cloudsso.GetAccessConfigurationsArgs{
    			DirectoryId: "example_value",
    			Ids: []string{
    				"example_value-1",
    				"example_value-2",
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("cloudSsoAccessConfigurationId1", ids.Configurations[0].Id)
    		nameRegex, err := cloudsso.GetAccessConfigurations(ctx, &cloudsso.GetAccessConfigurationsArgs{
    			DirectoryId: "example_value",
    			NameRegex:   pulumi.StringRef("^my-AccessConfiguration"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("cloudSsoAccessConfigurationId2", nameRegex.Configurations[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.GetAccessConfigurations.Invoke(new()
        {
            DirectoryId = "example_value",
            Ids = new[]
            {
                "example_value-1",
                "example_value-2",
            },
        });
    
        var nameRegex = AliCloud.CloudSso.GetAccessConfigurations.Invoke(new()
        {
            DirectoryId = "example_value",
            NameRegex = "^my-AccessConfiguration",
        });
    
        return new Dictionary<string, object?>
        {
            ["cloudSsoAccessConfigurationId1"] = ids.Apply(getAccessConfigurationsResult => getAccessConfigurationsResult.Configurations[0]?.Id),
            ["cloudSsoAccessConfigurationId2"] = nameRegex.Apply(getAccessConfigurationsResult => getAccessConfigurationsResult.Configurations[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.GetAccessConfigurationsArgs;
    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.getAccessConfigurations(GetAccessConfigurationsArgs.builder()
                .directoryId("example_value")
                .ids(            
                    "example_value-1",
                    "example_value-2")
                .build());
    
            ctx.export("cloudSsoAccessConfigurationId1", ids.applyValue(getAccessConfigurationsResult -> getAccessConfigurationsResult.configurations()[0].id()));
            final var nameRegex = CloudssoFunctions.getAccessConfigurations(GetAccessConfigurationsArgs.builder()
                .directoryId("example_value")
                .nameRegex("^my-AccessConfiguration")
                .build());
    
            ctx.export("cloudSsoAccessConfigurationId2", nameRegex.applyValue(getAccessConfigurationsResult -> getAccessConfigurationsResult.configurations()[0].id()));
        }
    }
    
    variables:
      ids:
        fn::invoke:
          Function: alicloud:cloudsso:getAccessConfigurations
          Arguments:
            directoryId: example_value
            ids:
              - example_value-1
              - example_value-2
      nameRegex:
        fn::invoke:
          Function: alicloud:cloudsso:getAccessConfigurations
          Arguments:
            directoryId: example_value
            nameRegex: ^my-AccessConfiguration
    outputs:
      cloudSsoAccessConfigurationId1: ${ids.configurations[0].id}
      cloudSsoAccessConfigurationId2: ${nameRegex.configurations[0].id}
    

    Using getAccessConfigurations

    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 getAccessConfigurations(args: GetAccessConfigurationsArgs, opts?: InvokeOptions): Promise<GetAccessConfigurationsResult>
    function getAccessConfigurationsOutput(args: GetAccessConfigurationsOutputArgs, opts?: InvokeOptions): Output<GetAccessConfigurationsResult>
    def get_access_configurations(directory_id: Optional[str] = None,
                                  enable_details: Optional[bool] = None,
                                  ids: Optional[Sequence[str]] = None,
                                  name_regex: Optional[str] = None,
                                  output_file: Optional[str] = None,
                                  opts: Optional[InvokeOptions] = None) -> GetAccessConfigurationsResult
    def get_access_configurations_output(directory_id: Optional[pulumi.Input[str]] = None,
                                  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[GetAccessConfigurationsResult]
    func GetAccessConfigurations(ctx *Context, args *GetAccessConfigurationsArgs, opts ...InvokeOption) (*GetAccessConfigurationsResult, error)
    func GetAccessConfigurationsOutput(ctx *Context, args *GetAccessConfigurationsOutputArgs, opts ...InvokeOption) GetAccessConfigurationsResultOutput

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

    public static class GetAccessConfigurations 
    {
        public static Task<GetAccessConfigurationsResult> InvokeAsync(GetAccessConfigurationsArgs args, InvokeOptions? opts = null)
        public static Output<GetAccessConfigurationsResult> Invoke(GetAccessConfigurationsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetAccessConfigurationsResult> getAccessConfigurations(GetAccessConfigurationsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:cloudsso/getAccessConfigurations:getAccessConfigurations
      arguments:
        # arguments dictionary

    The following arguments are supported:

    DirectoryId string
    The ID of the Directory.
    EnableDetails bool
    Default to false. Set it to true can output more details about resource attributes.
    Ids List<string>
    A list of Access Configuration IDs.
    NameRegex string
    A regex string to filter results by Access Configuration name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    DirectoryId string
    The ID of the Directory.
    EnableDetails bool
    Default to false. Set it to true can output more details about resource attributes.
    Ids []string
    A list of Access Configuration IDs.
    NameRegex string
    A regex string to filter results by Access Configuration name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    directoryId String
    The ID of the Directory.
    enableDetails Boolean
    Default to false. Set it to true can output more details about resource attributes.
    ids List<String>
    A list of Access Configuration IDs.
    nameRegex String
    A regex string to filter results by Access Configuration name.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    directoryId string
    The ID of the Directory.
    enableDetails boolean
    Default to false. Set it to true can output more details about resource attributes.
    ids string[]
    A list of Access Configuration IDs.
    nameRegex string
    A regex string to filter results by Access Configuration name.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    directory_id str
    The ID of the Directory.
    enable_details bool
    Default to false. Set it to true can output more details about resource attributes.
    ids Sequence[str]
    A list of Access Configuration IDs.
    name_regex str
    A regex string to filter results by Access Configuration name.
    output_file str
    File name where to save data source results (after running pulumi preview).
    directoryId String
    The ID of the Directory.
    enableDetails Boolean
    Default to false. Set it to true can output more details about resource attributes.
    ids List<String>
    A list of Access Configuration IDs.
    nameRegex String
    A regex string to filter results by Access Configuration name.
    outputFile String
    File name where to save data source results (after running pulumi preview).

    getAccessConfigurations Result

    The following output properties are available:

    Configurations List<Pulumi.AliCloud.CloudSso.Outputs.GetAccessConfigurationsConfiguration>
    DirectoryId string
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    Names List<string>
    EnableDetails bool
    NameRegex string
    OutputFile string
    Configurations []GetAccessConfigurationsConfiguration
    DirectoryId string
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    Names []string
    EnableDetails bool
    NameRegex string
    OutputFile string
    configurations List<GetAccessConfigurationsConfiguration>
    directoryId String
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    names List<String>
    enableDetails Boolean
    nameRegex String
    outputFile String
    configurations GetAccessConfigurationsConfiguration[]
    directoryId string
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    names string[]
    enableDetails boolean
    nameRegex string
    outputFile string
    configurations Sequence[GetAccessConfigurationsConfiguration]
    directory_id str
    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
    configurations List<Property Map>
    directoryId String
    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

    GetAccessConfigurationsConfiguration

    AccessConfigurationId string
    The AccessConfigurationId of the Access Configuration.
    AccessConfigurationName string
    The AccessConfigurationName of the Access Configuration.
    CreateTime string
    The Created Time of the Directory.
    Description string
    The Description of the Directory.
    DirectoryId string
    The ID of the Directory.
    Id string
    The ID of the Access Configuration.
    PermissionPolicies List<Pulumi.AliCloud.CloudSso.Inputs.GetAccessConfigurationsConfigurationPermissionPolicy>
    The Policy List.
    RelayState string
    The RelayState of the Access Configuration.
    SessionDuration int
    The SessionDuration of the Access Configuration.
    StatusNotifications List<string>
    The StatusNotifications of the Access Configuration.
    AccessConfigurationId string
    The AccessConfigurationId of the Access Configuration.
    AccessConfigurationName string
    The AccessConfigurationName of the Access Configuration.
    CreateTime string
    The Created Time of the Directory.
    Description string
    The Description of the Directory.
    DirectoryId string
    The ID of the Directory.
    Id string
    The ID of the Access Configuration.
    PermissionPolicies []GetAccessConfigurationsConfigurationPermissionPolicy
    The Policy List.
    RelayState string
    The RelayState of the Access Configuration.
    SessionDuration int
    The SessionDuration of the Access Configuration.
    StatusNotifications []string
    The StatusNotifications of the Access Configuration.
    accessConfigurationId String
    The AccessConfigurationId of the Access Configuration.
    accessConfigurationName String
    The AccessConfigurationName of the Access Configuration.
    createTime String
    The Created Time of the Directory.
    description String
    The Description of the Directory.
    directoryId String
    The ID of the Directory.
    id String
    The ID of the Access Configuration.
    permissionPolicies List<GetAccessConfigurationsConfigurationPermissionPolicy>
    The Policy List.
    relayState String
    The RelayState of the Access Configuration.
    sessionDuration Integer
    The SessionDuration of the Access Configuration.
    statusNotifications List<String>
    The StatusNotifications of the Access Configuration.
    accessConfigurationId string
    The AccessConfigurationId of the Access Configuration.
    accessConfigurationName string
    The AccessConfigurationName of the Access Configuration.
    createTime string
    The Created Time of the Directory.
    description string
    The Description of the Directory.
    directoryId string
    The ID of the Directory.
    id string
    The ID of the Access Configuration.
    permissionPolicies GetAccessConfigurationsConfigurationPermissionPolicy[]
    The Policy List.
    relayState string
    The RelayState of the Access Configuration.
    sessionDuration number
    The SessionDuration of the Access Configuration.
    statusNotifications string[]
    The StatusNotifications of the Access Configuration.
    access_configuration_id str
    The AccessConfigurationId of the Access Configuration.
    access_configuration_name str
    The AccessConfigurationName of the Access Configuration.
    create_time str
    The Created Time of the Directory.
    description str
    The Description of the Directory.
    directory_id str
    The ID of the Directory.
    id str
    The ID of the Access Configuration.
    permission_policies Sequence[GetAccessConfigurationsConfigurationPermissionPolicy]
    The Policy List.
    relay_state str
    The RelayState of the Access Configuration.
    session_duration int
    The SessionDuration of the Access Configuration.
    status_notifications Sequence[str]
    The StatusNotifications of the Access Configuration.
    accessConfigurationId String
    The AccessConfigurationId of the Access Configuration.
    accessConfigurationName String
    The AccessConfigurationName of the Access Configuration.
    createTime String
    The Created Time of the Directory.
    description String
    The Description of the Directory.
    directoryId String
    The ID of the Directory.
    id String
    The ID of the Access Configuration.
    permissionPolicies List<Property Map>
    The Policy List.
    relayState String
    The RelayState of the Access Configuration.
    sessionDuration Number
    The SessionDuration of the Access Configuration.
    statusNotifications List<String>
    The StatusNotifications of the Access Configuration.

    GetAccessConfigurationsConfigurationPermissionPolicy

    AddTime string
    The Creation time of policy.
    PermissionPolicyDocument string
    The Content of Policy.
    PermissionPolicyName string
    The Policy Name of policy.
    PermissionPolicyType string
    The Policy Type of policy. Valid values: System, Inline.
    AddTime string
    The Creation time of policy.
    PermissionPolicyDocument string
    The Content of Policy.
    PermissionPolicyName string
    The Policy Name of policy.
    PermissionPolicyType string
    The Policy Type of policy. Valid values: System, Inline.
    addTime String
    The Creation time of policy.
    permissionPolicyDocument String
    The Content of Policy.
    permissionPolicyName String
    The Policy Name of policy.
    permissionPolicyType String
    The Policy Type of policy. Valid values: System, Inline.
    addTime string
    The Creation time of policy.
    permissionPolicyDocument string
    The Content of Policy.
    permissionPolicyName string
    The Policy Name of policy.
    permissionPolicyType string
    The Policy Type of policy. Valid values: System, Inline.
    add_time str
    The Creation time of policy.
    permission_policy_document str
    The Content of Policy.
    permission_policy_name str
    The Policy Name of policy.
    permission_policy_type str
    The Policy Type of policy. Valid values: System, Inline.
    addTime String
    The Creation time of policy.
    permissionPolicyDocument String
    The Content of Policy.
    permissionPolicyName String
    The Policy Name of policy.
    permissionPolicyType String
    The Policy Type of policy. Valid values: System, Inline.

    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.57.1 published on Wednesday, Jun 26, 2024 by Pulumi