Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 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)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:cloudsso/getAccessAssignments:getAccessAssignments
arguments:
# arguments dictionary
The following arguments are supported:
- Directory
Id string - Directory ID.
- Access
Configuration stringId - Access configuration ID.
- Ids List<string>
- A list of Access Assignment IDs.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Principal
Type string - Create the identity type of the access assignment, which can be a user or a user group. Valid values:
Group
,User
. - Target
Id string - The ID of the target to create the resource range.
- Target
Type 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. Valid values:
RD-Account
.
- Directory
Id string - Directory ID.
- Access
Configuration stringId - Access configuration ID.
- Ids []string
- A list of Access Assignment IDs.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Principal
Type string - Create the identity type of the access assignment, which can be a user or a user group. Valid values:
Group
,User
. - Target
Id string - The ID of the target to create the resource range.
- Target
Type 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. Valid values:
RD-Account
.
- directory
Id String - Directory ID.
- access
Configuration StringId - Access configuration ID.
- ids List<String>
- A list of Access Assignment IDs.
- output
File String - File name where to save data source results (after running
pulumi preview
). - principal
Type String - Create the identity type of the access assignment, which can be a user or a user group. Valid values:
Group
,User
. - target
Id String - The ID of the target to create the resource range.
- target
Type 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. Valid values:
RD-Account
.
- directory
Id string - Directory ID.
- access
Configuration stringId - Access configuration ID.
- ids string[]
- A list of Access Assignment IDs.
- output
File string - File name where to save data source results (after running
pulumi preview
). - principal
Type string - Create the identity type of the access assignment, which can be a user or a user group. Valid values:
Group
,User
. - target
Id string - The ID of the target to create the resource range.
- target
Type 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. Valid values:
RD-Account
.
- directory_
id str - Directory ID.
- access_
configuration_ strid - Access configuration ID.
- ids Sequence[str]
- A list of Access Assignment IDs.
- output_
file str - File name where to save data source results (after running
pulumi preview
). - principal_
type str - Create the identity type of the access assignment, which can be a user or a user group. Valid values:
Group
,User
. - target_
id str - The ID of the target to create the resource range.
- target_
type 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. Valid values:
RD-Account
.
- directory
Id String - Directory ID.
- access
Configuration StringId - Access configuration ID.
- ids List<String>
- A list of Access Assignment IDs.
- output
File String - File name where to save data source results (after running
pulumi preview
). - principal
Type String - Create the identity type of the access assignment, which can be a user or a user group. Valid values:
Group
,User
. - target
Id String - The ID of the target to create the resource range.
- target
Type 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. 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 stringId - Access configuration ID.
- Access
Configuration stringName - The name of the access configuration.
- Directory
Id string - Directory ID.
- Id string
- The ID of the Access Assignment.
- Principal
Id string - The ID of the access assignment.
- Principal
Name string - Cloud SSO identity name.
- Principal
Type string - Create the identity type of the access assignment, which can be a user or a user group.
- Target
Id string - The ID of the target to create the resource range.
- Target
Name string - Task target name.
- Target
Path stringName - The path name of the task target in the resource directory.
- Target
Type 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 stringId - Access configuration ID.
- Access
Configuration stringName - The name of the access configuration.
- Directory
Id string - Directory ID.
- Id string
- The ID of the Access Assignment.
- Principal
Id string - The ID of the access assignment.
- Principal
Name string - Cloud SSO identity name.
- Principal
Type string - Create the identity type of the access assignment, which can be a user or a user group.
- Target
Id string - The ID of the target to create the resource range.
- Target
Name string - Task target name.
- Target
Path stringName - The path name of the task target in the resource directory.
- Target
Type 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 StringId - Access configuration ID.
- access
Configuration StringName - The name of the access configuration.
- directory
Id String - Directory ID.
- id String
- The ID of the Access Assignment.
- principal
Id String - The ID of the access assignment.
- principal
Name String - Cloud SSO identity name.
- principal
Type String - Create the identity type of the access assignment, which can be a user or a user group.
- target
Id String - The ID of the target to create the resource range.
- target
Name String - Task target name.
- target
Path StringName - The path name of the task target in the resource directory.
- target
Type 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 stringId - Access configuration ID.
- access
Configuration stringName - The name of the access configuration.
- directory
Id string - Directory ID.
- id string
- The ID of the Access Assignment.
- principal
Id string - The ID of the access assignment.
- principal
Name string - Cloud SSO identity name.
- principal
Type string - Create the identity type of the access assignment, which can be a user or a user group.
- target
Id string - The ID of the target to create the resource range.
- target
Name string - Task target name.
- target
Path stringName - The path name of the task target in the resource directory.
- target
Type 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_ strid - Access configuration ID.
- access_
configuration_ strname - The name of the access configuration.
- directory_
id str - Directory ID.
- id str
- The ID of the Access Assignment.
- principal_
id str - The ID of the access assignment.
- principal_
name str - Cloud SSO identity name.
- principal_
type str - Create the identity type of the access assignment, which can be a user or a user group.
- target_
id str - The ID of the target to create the resource range.
- target_
name str - Task target name.
- target_
path_ strname - The path name of the task target in the resource directory.
- target_
type 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 StringId - Access configuration ID.
- access
Configuration StringName - The name of the access configuration.
- directory
Id String - Directory ID.
- id String
- The ID of the Access Assignment.
- principal
Id String - The ID of the access assignment.
- principal
Name String - Cloud SSO identity name.
- principal
Type String - Create the identity type of the access assignment, which can be a user or a user group.
- target
Id String - The ID of the target to create the resource range.
- target
Name String - Task target name.
- target
Path StringName - The path name of the task target in the resource directory.
- target
Type 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.