1. Packages
  2. AWS
  3. API Docs
  4. ssoadmin
  5. getPermissionSets
AWS v6.59.1 published on Tuesday, Nov 12, 2024 by Pulumi

aws.ssoadmin.getPermissionSets

Explore with Pulumi AI

aws logo
AWS v6.59.1 published on Tuesday, Nov 12, 2024 by Pulumi

    Data source returning the ARN of all AWS SSO Admin Permission Sets.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = aws.ssoadmin.getInstances({});
    const exampleGetPermissionSets = example.then(example => aws.ssoadmin.getPermissionSets({
        instanceArn: example.arns?.[0],
    }));
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.ssoadmin.get_instances()
    example_get_permission_sets = aws.ssoadmin.get_permission_sets(instance_arn=example.arns[0])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssoadmin"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := ssoadmin.GetInstances(ctx, map[string]interface{}{}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = ssoadmin.GetPermissionSets(ctx, &ssoadmin.GetPermissionSetsArgs{
    			InstanceArn: example.Arns[0],
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Aws.SsoAdmin.GetInstances.Invoke();
    
        var exampleGetPermissionSets = Aws.SsoAdmin.GetPermissionSets.Invoke(new()
        {
            InstanceArn = example.Apply(getInstancesResult => getInstancesResult.Arns[0]),
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.ssoadmin.SsoadminFunctions;
    import com.pulumi.aws.ssoadmin.inputs.GetPermissionSetsArgs;
    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 example = SsoadminFunctions.getInstances();
    
            final var exampleGetPermissionSets = SsoadminFunctions.getPermissionSets(GetPermissionSetsArgs.builder()
                .instanceArn(example.applyValue(getInstancesResult -> getInstancesResult.arns()[0]))
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: aws:ssoadmin:getInstances
          Arguments: {}
      exampleGetPermissionSets:
        fn::invoke:
          Function: aws:ssoadmin:getPermissionSets
          Arguments:
            instanceArn: ${example.arns[0]}
    

    Using getPermissionSets

    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 getPermissionSets(args: GetPermissionSetsArgs, opts?: InvokeOptions): Promise<GetPermissionSetsResult>
    function getPermissionSetsOutput(args: GetPermissionSetsOutputArgs, opts?: InvokeOptions): Output<GetPermissionSetsResult>
    def get_permission_sets(instance_arn: Optional[str] = None,
                            opts: Optional[InvokeOptions] = None) -> GetPermissionSetsResult
    def get_permission_sets_output(instance_arn: Optional[pulumi.Input[str]] = None,
                            opts: Optional[InvokeOptions] = None) -> Output[GetPermissionSetsResult]
    func GetPermissionSets(ctx *Context, args *GetPermissionSetsArgs, opts ...InvokeOption) (*GetPermissionSetsResult, error)
    func GetPermissionSetsOutput(ctx *Context, args *GetPermissionSetsOutputArgs, opts ...InvokeOption) GetPermissionSetsResultOutput

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

    public static class GetPermissionSets 
    {
        public static Task<GetPermissionSetsResult> InvokeAsync(GetPermissionSetsArgs args, InvokeOptions? opts = null)
        public static Output<GetPermissionSetsResult> Invoke(GetPermissionSetsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetPermissionSetsResult> getPermissionSets(GetPermissionSetsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: aws:ssoadmin/getPermissionSets:getPermissionSets
      arguments:
        # arguments dictionary

    The following arguments are supported:

    InstanceArn string
    ARN of the SSO Instance associated with the permission set.
    InstanceArn string
    ARN of the SSO Instance associated with the permission set.
    instanceArn String
    ARN of the SSO Instance associated with the permission set.
    instanceArn string
    ARN of the SSO Instance associated with the permission set.
    instance_arn str
    ARN of the SSO Instance associated with the permission set.
    instanceArn String
    ARN of the SSO Instance associated with the permission set.

    getPermissionSets Result

    The following output properties are available:

    Arns List<string>
    Set of string contain the ARN of all Permission Sets.
    Id string
    InstanceArn string
    Arns []string
    Set of string contain the ARN of all Permission Sets.
    Id string
    InstanceArn string
    arns List<String>
    Set of string contain the ARN of all Permission Sets.
    id String
    instanceArn String
    arns string[]
    Set of string contain the ARN of all Permission Sets.
    id string
    instanceArn string
    arns Sequence[str]
    Set of string contain the ARN of all Permission Sets.
    id str
    instance_arn str
    arns List<String>
    Set of string contain the ARN of all Permission Sets.
    id String
    instanceArn String

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    AWS v6.59.1 published on Tuesday, Nov 12, 2024 by Pulumi