github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/ssoadmin/getApplication.go (about)

     1  // Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
     2  // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
     3  
     4  package ssoadmin
     5  
     6  import (
     7  	"context"
     8  	"reflect"
     9  
    10  	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal"
    11  	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    12  )
    13  
    14  // Data source for managing an AWS SSO Admin Application.
    15  //
    16  // ## Example Usage
    17  //
    18  // ### Basic Usage
    19  //
    20  // <!--Start PulumiCodeChooser -->
    21  // ```go
    22  // package main
    23  //
    24  // import (
    25  //
    26  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssoadmin"
    27  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    28  //
    29  // )
    30  //
    31  //	func main() {
    32  //		pulumi.Run(func(ctx *pulumi.Context) error {
    33  //			_, err := ssoadmin.LookupApplication(ctx, &ssoadmin.LookupApplicationArgs{
    34  //				ApplicationArn: "arn:aws:sso::012345678901:application/ssoins-1234/apl-5678",
    35  //			}, nil)
    36  //			if err != nil {
    37  //				return err
    38  //			}
    39  //			return nil
    40  //		})
    41  //	}
    42  //
    43  // ```
    44  // <!--End PulumiCodeChooser -->
    45  func LookupApplication(ctx *pulumi.Context, args *LookupApplicationArgs, opts ...pulumi.InvokeOption) (*LookupApplicationResult, error) {
    46  	opts = internal.PkgInvokeDefaultOpts(opts)
    47  	var rv LookupApplicationResult
    48  	err := ctx.Invoke("aws:ssoadmin/getApplication:getApplication", args, &rv, opts...)
    49  	if err != nil {
    50  		return nil, err
    51  	}
    52  	return &rv, nil
    53  }
    54  
    55  // A collection of arguments for invoking getApplication.
    56  type LookupApplicationArgs struct {
    57  	// ARN of the application.
    58  	ApplicationArn string `pulumi:"applicationArn"`
    59  	// Options for the portal associated with an application. See the `ssoadmin.Application` resource documentation. The attributes are the same.
    60  	PortalOptions []GetApplicationPortalOption `pulumi:"portalOptions"`
    61  }
    62  
    63  // A collection of values returned by getApplication.
    64  type LookupApplicationResult struct {
    65  	// AWS account ID.
    66  	ApplicationAccount string `pulumi:"applicationAccount"`
    67  	ApplicationArn     string `pulumi:"applicationArn"`
    68  	// ARN of the application provider.
    69  	ApplicationProviderArn string `pulumi:"applicationProviderArn"`
    70  	// Description of the application.
    71  	Description string `pulumi:"description"`
    72  	// ARN of the application.
    73  	Id string `pulumi:"id"`
    74  	// ARN of the instance of IAM Identity Center.
    75  	InstanceArn string `pulumi:"instanceArn"`
    76  	// Name of the application.
    77  	Name string `pulumi:"name"`
    78  	// Options for the portal associated with an application. See the `ssoadmin.Application` resource documentation. The attributes are the same.
    79  	PortalOptions []GetApplicationPortalOption `pulumi:"portalOptions"`
    80  	// Status of the application.
    81  	Status string `pulumi:"status"`
    82  }
    83  
    84  func LookupApplicationOutput(ctx *pulumi.Context, args LookupApplicationOutputArgs, opts ...pulumi.InvokeOption) LookupApplicationResultOutput {
    85  	return pulumi.ToOutputWithContext(context.Background(), args).
    86  		ApplyT(func(v interface{}) (LookupApplicationResult, error) {
    87  			args := v.(LookupApplicationArgs)
    88  			r, err := LookupApplication(ctx, &args, opts...)
    89  			var s LookupApplicationResult
    90  			if r != nil {
    91  				s = *r
    92  			}
    93  			return s, err
    94  		}).(LookupApplicationResultOutput)
    95  }
    96  
    97  // A collection of arguments for invoking getApplication.
    98  type LookupApplicationOutputArgs struct {
    99  	// ARN of the application.
   100  	ApplicationArn pulumi.StringInput `pulumi:"applicationArn"`
   101  	// Options for the portal associated with an application. See the `ssoadmin.Application` resource documentation. The attributes are the same.
   102  	PortalOptions GetApplicationPortalOptionArrayInput `pulumi:"portalOptions"`
   103  }
   104  
   105  func (LookupApplicationOutputArgs) ElementType() reflect.Type {
   106  	return reflect.TypeOf((*LookupApplicationArgs)(nil)).Elem()
   107  }
   108  
   109  // A collection of values returned by getApplication.
   110  type LookupApplicationResultOutput struct{ *pulumi.OutputState }
   111  
   112  func (LookupApplicationResultOutput) ElementType() reflect.Type {
   113  	return reflect.TypeOf((*LookupApplicationResult)(nil)).Elem()
   114  }
   115  
   116  func (o LookupApplicationResultOutput) ToLookupApplicationResultOutput() LookupApplicationResultOutput {
   117  	return o
   118  }
   119  
   120  func (o LookupApplicationResultOutput) ToLookupApplicationResultOutputWithContext(ctx context.Context) LookupApplicationResultOutput {
   121  	return o
   122  }
   123  
   124  // AWS account ID.
   125  func (o LookupApplicationResultOutput) ApplicationAccount() pulumi.StringOutput {
   126  	return o.ApplyT(func(v LookupApplicationResult) string { return v.ApplicationAccount }).(pulumi.StringOutput)
   127  }
   128  
   129  func (o LookupApplicationResultOutput) ApplicationArn() pulumi.StringOutput {
   130  	return o.ApplyT(func(v LookupApplicationResult) string { return v.ApplicationArn }).(pulumi.StringOutput)
   131  }
   132  
   133  // ARN of the application provider.
   134  func (o LookupApplicationResultOutput) ApplicationProviderArn() pulumi.StringOutput {
   135  	return o.ApplyT(func(v LookupApplicationResult) string { return v.ApplicationProviderArn }).(pulumi.StringOutput)
   136  }
   137  
   138  // Description of the application.
   139  func (o LookupApplicationResultOutput) Description() pulumi.StringOutput {
   140  	return o.ApplyT(func(v LookupApplicationResult) string { return v.Description }).(pulumi.StringOutput)
   141  }
   142  
   143  // ARN of the application.
   144  func (o LookupApplicationResultOutput) Id() pulumi.StringOutput {
   145  	return o.ApplyT(func(v LookupApplicationResult) string { return v.Id }).(pulumi.StringOutput)
   146  }
   147  
   148  // ARN of the instance of IAM Identity Center.
   149  func (o LookupApplicationResultOutput) InstanceArn() pulumi.StringOutput {
   150  	return o.ApplyT(func(v LookupApplicationResult) string { return v.InstanceArn }).(pulumi.StringOutput)
   151  }
   152  
   153  // Name of the application.
   154  func (o LookupApplicationResultOutput) Name() pulumi.StringOutput {
   155  	return o.ApplyT(func(v LookupApplicationResult) string { return v.Name }).(pulumi.StringOutput)
   156  }
   157  
   158  // Options for the portal associated with an application. See the `ssoadmin.Application` resource documentation. The attributes are the same.
   159  func (o LookupApplicationResultOutput) PortalOptions() GetApplicationPortalOptionArrayOutput {
   160  	return o.ApplyT(func(v LookupApplicationResult) []GetApplicationPortalOption { return v.PortalOptions }).(GetApplicationPortalOptionArrayOutput)
   161  }
   162  
   163  // Status of the application.
   164  func (o LookupApplicationResultOutput) Status() pulumi.StringOutput {
   165  	return o.ApplyT(func(v LookupApplicationResult) string { return v.Status }).(pulumi.StringOutput)
   166  }
   167  
   168  func init() {
   169  	pulumi.RegisterOutputType(LookupApplicationResultOutput{})
   170  }