Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi
alicloud.cloudsso.getAccessAssignments
Explore with Pulumi AI
This data source provides the Cloud Sso Access Assignments of the current Alibaba Cloud user.
NOTE: Available in v1.193.0+.
NOTE: Cloud SSO Only Support
cn-shanghai
Andus-west-1
Region
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const ids = alicloud.cloudsso.getAccessAssignments({
directoryId: "example_value",
ids: [
"example_value-1",
"example_value-2",
],
});
export const cloudSsoAccessAssignmentId1 = ids.then(ids => ids.assignments?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
ids = alicloud.cloudsso.get_access_assignments(directory_id="example_value",
ids=[
"example_value-1",
"example_value-2",
])
pulumi.export("cloudSsoAccessAssignmentId1", ids.assignments[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.GetAccessAssignments(ctx, &cloudsso.GetAccessAssignmentsArgs{
DirectoryId: "example_value",
Ids: []string{
"example_value-1",
"example_value-2",
},
}, nil)
if err != nil {
return err
}
ctx.Export("cloudSsoAccessAssignmentId1", ids.Assignments[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.GetAccessAssignments.Invoke(new()
{
DirectoryId = "example_value",
Ids = new[]
{
"example_value-1",
"example_value-2",
},
});
return new Dictionary<string, object?>
{
["cloudSsoAccessAssignmentId1"] = ids.Apply(getAccessAssignmentsResult => getAccessAssignmentsResult.Assignments[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.GetAccessAssignmentsArgs;
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.getAccessAssignments(GetAccessAssignmentsArgs.builder()
.directoryId("example_value")
.ids(
"example_value-1",
"example_value-2")
.build());
ctx.export("cloudSsoAccessAssignmentId1", ids.applyValue(getAccessAssignmentsResult -> getAccessAssignmentsResult.assignments()[0].id()));
}
}
variables:
ids:
fn::invoke:
function: alicloud:cloudsso:getAccessAssignments
arguments:
directoryId: example_value
ids:
- example_value-1
- example_value-2
outputs:
cloudSsoAccessAssignmentId1: ${ids.assignments[0].id}
Using getAccessAssignments
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 getAccessAssignments(args: GetAccessAssignmentsArgs, opts?: InvokeOptions): Promise<GetAccessAssignmentsResult>
function getAccessAssignmentsOutput(args: GetAccessAssignmentsOutputArgs, opts?: InvokeOptions): Output<GetAccessAssignmentsResult>
def get_access_assignments(access_configuration_id: Optional[str] = None,
directory_id: Optional[str] = None,
ids: Optional[Sequence[str]] = None,
output_file: Optional[str] = None,
principal_type: Optional[str] = None,
target_id: Optional[str] = None,
target_type: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetAccessAssignmentsResult
def get_access_assignments_output(access_configuration_id: Optional[pulumi.Input[str]] = None,
directory_id: Optional[pulumi.Input[str]] = None,
ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
output_file: Optional[pulumi.Input[str]] = None,
principal_type: Optional[pulumi.Input[str]] = None,
target_id: Optional[pulumi.Input[str]] = None,
target_type: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetAccessAssignmentsResult]
func GetAccessAssignments(ctx *Context, args *GetAccessAssignmentsArgs, opts ...InvokeOption) (*GetAccessAssignmentsResult, error)
func GetAccessAssignmentsOutput(ctx *Context, args *GetAccessAssignmentsOutputArgs, opts ...InvokeOption) GetAccessAssignmentsResultOutput
> Note: This function is named GetAccessAssignments
in the Go SDK.
public static class GetAccessAssignments
{
public static Task<GetAccessAssignmentsResult> InvokeAsync(GetAccessAssignmentsArgs args, InvokeOptions? opts = null)
public static Output<GetAccessAssignmentsResult> Invoke(GetAccessAssignmentsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetAccessAssignmentsResult> getAccessAssignments(GetAccessAssignmentsArgs args, InvokeOptions options)
public static Output<GetAccessAssignmentsResult> getAccessAssignments(GetAccessAssignmentsArgs args, InvokeOptions options)
fn::invoke:
function: alicloud:cloudsso/getAccessAssignments:getAccessAssignments
arguments:
# arguments dictionary
The following arguments are supported:
- Directory
Id This property is required. Changes to this property will trigger replacement.
- Directory ID.
- Access
Configuration Id Changes to this property will trigger replacement.
- Access configuration ID.
- Ids
Changes to this property will trigger replacement.
- A list of Access Assignment IDs.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Principal
Type Changes to this property will trigger replacement.
- Create the identity type of the access assignment, which can be a user or a user group. Valid values:
Group
,User
. - Target
Id Changes to this property will trigger replacement.
- The ID of the target to create the resource range.
- Target
Type Changes to this property will trigger replacement.
- The type of the resource range target to be accessed. Only a single RD primary account or member account can be specified in the first phase. Valid values:
RD-Account
.
- Directory
Id This property is required. Changes to this property will trigger replacement.
- Directory ID.
- Access
Configuration Id Changes to this property will trigger replacement.
- Access configuration ID.
- Ids
Changes to this property will trigger replacement.
- A list of Access Assignment IDs.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Principal
Type Changes to this property will trigger replacement.
- Create the identity type of the access assignment, which can be a user or a user group. Valid values:
Group
,User
. - Target
Id Changes to this property will trigger replacement.
- The ID of the target to create the resource range.
- Target
Type Changes to this property will trigger replacement.
- The type of the resource range target to be accessed. Only a single RD primary account or member account can be specified in the first phase. Valid values:
RD-Account
.
- directory
Id This property is required. Changes to this property will trigger replacement.
- Directory ID.
- access
Configuration Id Changes to this property will trigger replacement.
- Access configuration ID.
- ids
Changes to this property will trigger replacement.
- A list of Access Assignment IDs.
- output
File String - File name where to save data source results (after running
pulumi preview
). - principal
Type Changes to this property will trigger replacement.
- Create the identity type of the access assignment, which can be a user or a user group. Valid values:
Group
,User
. - target
Id Changes to this property will trigger replacement.
- The ID of the target to create the resource range.
- target
Type Changes to this property will trigger replacement.
- The type of the resource range target to be accessed. Only a single RD primary account or member account can be specified in the first phase. Valid values:
RD-Account
.
- directory
Id This property is required. Changes to this property will trigger replacement.
- Directory ID.
- access
Configuration Id Changes to this property will trigger replacement.
- Access configuration ID.
- ids
Changes to this property will trigger replacement.
- A list of Access Assignment IDs.
- output
File string - File name where to save data source results (after running
pulumi preview
). - principal
Type Changes to this property will trigger replacement.
- Create the identity type of the access assignment, which can be a user or a user group. Valid values:
Group
,User
. - target
Id Changes to this property will trigger replacement.
- The ID of the target to create the resource range.
- target
Type Changes to this property will trigger replacement.
- The type of the resource range target to be accessed. Only a single RD primary account or member account can be specified in the first phase. Valid values:
RD-Account
.
- directory_
id This property is required. Changes to this property will trigger replacement.
- Directory ID.
- access_
configuration_ id Changes to this property will trigger replacement.
- Access configuration ID.
- ids
Changes to this property will trigger replacement.
- A list of Access Assignment IDs.
- output_
file str - File name where to save data source results (after running
pulumi preview
). - principal_
type Changes to this property will trigger replacement.
- Create the identity type of the access assignment, which can be a user or a user group. Valid values:
Group
,User
. - target_
id Changes to this property will trigger replacement.
- The ID of the target to create the resource range.
- target_
type Changes to this property will trigger replacement.
- The type of the resource range target to be accessed. Only a single RD primary account or member account can be specified in the first phase. Valid values:
RD-Account
.
- directory
Id This property is required. Changes to this property will trigger replacement.
- Directory ID.
- access
Configuration Id Changes to this property will trigger replacement.
- Access configuration ID.
- ids
Changes to this property will trigger replacement.
- A list of Access Assignment IDs.
- output
File String - File name where to save data source results (after running
pulumi preview
). - principal
Type Changes to this property will trigger replacement.
- Create the identity type of the access assignment, which can be a user or a user group. Valid values:
Group
,User
. - target
Id Changes to this property will trigger replacement.
- The ID of the target to create the resource range.
- target
Type Changes to this property will trigger replacement.
- The type of the resource range target to be accessed. Only a single RD primary account or member account can be specified in the first phase. Valid values:
RD-Account
.
getAccessAssignments Result
The following output properties are available:
- Assignments
List<Pulumi.
Ali Cloud. Cloud Sso. Outputs. Get Access Assignments Assignment> - Directory
Id string - Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Access
Configuration stringId - Output
File string - Principal
Type string - Target
Id string - Target
Type string
- Assignments
[]Get
Access Assignments Assignment - Directory
Id string - Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Access
Configuration stringId - Output
File string - Principal
Type string - Target
Id string - Target
Type string
- assignments
List<Get
Access Assignments Assignment> - directory
Id String - id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- access
Configuration StringId - output
File String - principal
Type String - target
Id String - target
Type String
- assignments
Get
Access Assignments Assignment[] - directory
Id string - id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- access
Configuration stringId - output
File string - principal
Type string - target
Id string - target
Type string
- assignments
Sequence[Get
Access Assignments Assignment] - directory_
id str - id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- access_
configuration_ strid - output_
file str - principal_
type str - target_
id str - target_
type str
- assignments List<Property Map>
- directory
Id String - id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- access
Configuration StringId - output
File String - principal
Type String - target
Id String - target
Type String
Supporting Types
GetAccessAssignmentsAssignment
- Access
Configuration Id This property is required. string - Access configuration ID.
- Access
Configuration Name This property is required. string - The name of the access configuration.
- Directory
Id This property is required. string - Directory ID.
- Id
This property is required. string - The ID of the Access Assignment.
- Principal
Id This property is required. string - The ID of the access assignment.
- Principal
Name This property is required. string - Cloud SSO identity name.
- Principal
Type This property is required. string - Create the identity type of the access assignment, which can be a user or a user group.
- Target
Id This property is required. string - The ID of the target to create the resource range.
- Target
Name This property is required. string - Task target name.
- Target
Path Name This property is required. string - The path name of the task target in the resource directory.
- Target
Type This property is required. string - The type of the resource range target to be accessed. Only a single RD primary account or member account can be specified in the first phase.
- Access
Configuration Id This property is required. string - Access configuration ID.
- Access
Configuration Name This property is required. string - The name of the access configuration.
- Directory
Id This property is required. string - Directory ID.
- Id
This property is required. string - The ID of the Access Assignment.
- Principal
Id This property is required. string - The ID of the access assignment.
- Principal
Name This property is required. string - Cloud SSO identity name.
- Principal
Type This property is required. string - Create the identity type of the access assignment, which can be a user or a user group.
- Target
Id This property is required. string - The ID of the target to create the resource range.
- Target
Name This property is required. string - Task target name.
- Target
Path Name This property is required. string - The path name of the task target in the resource directory.
- Target
Type This property is required. string - The type of the resource range target to be accessed. Only a single RD primary account or member account can be specified in the first phase.
- access
Configuration Id This property is required. String - Access configuration ID.
- access
Configuration Name This property is required. String - The name of the access configuration.
- directory
Id This property is required. String - Directory ID.
- id
This property is required. String - The ID of the Access Assignment.
- principal
Id This property is required. String - The ID of the access assignment.
- principal
Name This property is required. String - Cloud SSO identity name.
- principal
Type This property is required. String - Create the identity type of the access assignment, which can be a user or a user group.
- target
Id This property is required. String - The ID of the target to create the resource range.
- target
Name This property is required. String - Task target name.
- target
Path Name This property is required. String - The path name of the task target in the resource directory.
- target
Type This property is required. String - The type of the resource range target to be accessed. Only a single RD primary account or member account can be specified in the first phase.
- access
Configuration Id This property is required. string - Access configuration ID.
- access
Configuration Name This property is required. string - The name of the access configuration.
- directory
Id This property is required. string - Directory ID.
- id
This property is required. string - The ID of the Access Assignment.
- principal
Id This property is required. string - The ID of the access assignment.
- principal
Name This property is required. string - Cloud SSO identity name.
- principal
Type This property is required. string - Create the identity type of the access assignment, which can be a user or a user group.
- target
Id This property is required. string - The ID of the target to create the resource range.
- target
Name This property is required. string - Task target name.
- target
Path Name This property is required. string - The path name of the task target in the resource directory.
- target
Type This property is required. string - The type of the resource range target to be accessed. Only a single RD primary account or member account can be specified in the first phase.
- access_
configuration_ id This property is required. str - Access configuration ID.
- access_
configuration_ name This property is required. str - The name of the access configuration.
- directory_
id This property is required. str - Directory ID.
- id
This property is required. str - The ID of the Access Assignment.
- principal_
id This property is required. str - The ID of the access assignment.
- principal_
name This property is required. str - Cloud SSO identity name.
- principal_
type This property is required. str - Create the identity type of the access assignment, which can be a user or a user group.
- target_
id This property is required. str - The ID of the target to create the resource range.
- target_
name This property is required. str - Task target name.
- target_
path_ name This property is required. str - The path name of the task target in the resource directory.
- target_
type This property is required. str - The type of the resource range target to be accessed. Only a single RD primary account or member account can be specified in the first phase.
- access
Configuration Id This property is required. String - Access configuration ID.
- access
Configuration Name This property is required. String - The name of the access configuration.
- directory
Id This property is required. String - Directory ID.
- id
This property is required. String - The ID of the Access Assignment.
- principal
Id This property is required. String - The ID of the access assignment.
- principal
Name This property is required. String - Cloud SSO identity name.
- principal
Type This property is required. String - Create the identity type of the access assignment, which can be a user or a user group.
- target
Id This property is required. String - The ID of the target to create the resource range.
- target
Name This property is required. String - Task target name.
- target
Path Name This property is required. String - The path name of the task target in the resource directory.
- target
Type This property is required. String - The type of the resource range target to be accessed. Only a single RD primary account or member account can be specified in the first phase.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.