github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/quicksight/getTheme.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 quicksight
     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 QuickSight Theme.
    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/quicksight"
    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 := quicksight.LookupTheme(ctx, &quicksight.LookupThemeArgs{
    34  //				ThemeId: "example",
    35  //			}, nil)
    36  //			if err != nil {
    37  //				return err
    38  //			}
    39  //			return nil
    40  //		})
    41  //	}
    42  //
    43  // ```
    44  // <!--End PulumiCodeChooser -->
    45  func LookupTheme(ctx *pulumi.Context, args *LookupThemeArgs, opts ...pulumi.InvokeOption) (*LookupThemeResult, error) {
    46  	opts = internal.PkgInvokeDefaultOpts(opts)
    47  	var rv LookupThemeResult
    48  	err := ctx.Invoke("aws:quicksight/getTheme:getTheme", 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 getTheme.
    56  type LookupThemeArgs struct {
    57  	// AWS account ID.
    58  	AwsAccountId *string `pulumi:"awsAccountId"`
    59  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
    60  	Tags map[string]string `pulumi:"tags"`
    61  	// Identifier of the theme.
    62  	//
    63  	// The following arguments are optional:
    64  	ThemeId string `pulumi:"themeId"`
    65  }
    66  
    67  // A collection of values returned by getTheme.
    68  type LookupThemeResult struct {
    69  	// ARN of the theme.
    70  	Arn          string `pulumi:"arn"`
    71  	AwsAccountId string `pulumi:"awsAccountId"`
    72  	// The ID of the theme that a custom theme will inherit from. All themes inherit from one of the starting themes defined by Amazon QuickSight.
    73  	BaseThemeId string `pulumi:"baseThemeId"`
    74  	// The theme configuration, which contains the theme display properties. See configuration.
    75  	Configurations []GetThemeConfiguration `pulumi:"configurations"`
    76  	// The time that the theme was created.
    77  	CreatedTime string `pulumi:"createdTime"`
    78  	// The provider-assigned unique ID for this managed resource.
    79  	Id string `pulumi:"id"`
    80  	// The time that the theme was last updated.
    81  	LastUpdatedTime string `pulumi:"lastUpdatedTime"`
    82  	// Display name of the theme.
    83  	Name string `pulumi:"name"`
    84  	// A set of resource permissions on the theme. See permissions.
    85  	Permissions []GetThemePermission `pulumi:"permissions"`
    86  	// The theme creation status.
    87  	Status string `pulumi:"status"`
    88  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
    89  	Tags    map[string]string `pulumi:"tags"`
    90  	ThemeId string            `pulumi:"themeId"`
    91  	// A description of the current theme version being created/updated.
    92  	VersionDescription string `pulumi:"versionDescription"`
    93  	// The version number of the theme version.
    94  	VersionNumber int `pulumi:"versionNumber"`
    95  }
    96  
    97  func LookupThemeOutput(ctx *pulumi.Context, args LookupThemeOutputArgs, opts ...pulumi.InvokeOption) LookupThemeResultOutput {
    98  	return pulumi.ToOutputWithContext(context.Background(), args).
    99  		ApplyT(func(v interface{}) (LookupThemeResult, error) {
   100  			args := v.(LookupThemeArgs)
   101  			r, err := LookupTheme(ctx, &args, opts...)
   102  			var s LookupThemeResult
   103  			if r != nil {
   104  				s = *r
   105  			}
   106  			return s, err
   107  		}).(LookupThemeResultOutput)
   108  }
   109  
   110  // A collection of arguments for invoking getTheme.
   111  type LookupThemeOutputArgs struct {
   112  	// AWS account ID.
   113  	AwsAccountId pulumi.StringPtrInput `pulumi:"awsAccountId"`
   114  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   115  	Tags pulumi.StringMapInput `pulumi:"tags"`
   116  	// Identifier of the theme.
   117  	//
   118  	// The following arguments are optional:
   119  	ThemeId pulumi.StringInput `pulumi:"themeId"`
   120  }
   121  
   122  func (LookupThemeOutputArgs) ElementType() reflect.Type {
   123  	return reflect.TypeOf((*LookupThemeArgs)(nil)).Elem()
   124  }
   125  
   126  // A collection of values returned by getTheme.
   127  type LookupThemeResultOutput struct{ *pulumi.OutputState }
   128  
   129  func (LookupThemeResultOutput) ElementType() reflect.Type {
   130  	return reflect.TypeOf((*LookupThemeResult)(nil)).Elem()
   131  }
   132  
   133  func (o LookupThemeResultOutput) ToLookupThemeResultOutput() LookupThemeResultOutput {
   134  	return o
   135  }
   136  
   137  func (o LookupThemeResultOutput) ToLookupThemeResultOutputWithContext(ctx context.Context) LookupThemeResultOutput {
   138  	return o
   139  }
   140  
   141  // ARN of the theme.
   142  func (o LookupThemeResultOutput) Arn() pulumi.StringOutput {
   143  	return o.ApplyT(func(v LookupThemeResult) string { return v.Arn }).(pulumi.StringOutput)
   144  }
   145  
   146  func (o LookupThemeResultOutput) AwsAccountId() pulumi.StringOutput {
   147  	return o.ApplyT(func(v LookupThemeResult) string { return v.AwsAccountId }).(pulumi.StringOutput)
   148  }
   149  
   150  // The ID of the theme that a custom theme will inherit from. All themes inherit from one of the starting themes defined by Amazon QuickSight.
   151  func (o LookupThemeResultOutput) BaseThemeId() pulumi.StringOutput {
   152  	return o.ApplyT(func(v LookupThemeResult) string { return v.BaseThemeId }).(pulumi.StringOutput)
   153  }
   154  
   155  // The theme configuration, which contains the theme display properties. See configuration.
   156  func (o LookupThemeResultOutput) Configurations() GetThemeConfigurationArrayOutput {
   157  	return o.ApplyT(func(v LookupThemeResult) []GetThemeConfiguration { return v.Configurations }).(GetThemeConfigurationArrayOutput)
   158  }
   159  
   160  // The time that the theme was created.
   161  func (o LookupThemeResultOutput) CreatedTime() pulumi.StringOutput {
   162  	return o.ApplyT(func(v LookupThemeResult) string { return v.CreatedTime }).(pulumi.StringOutput)
   163  }
   164  
   165  // The provider-assigned unique ID for this managed resource.
   166  func (o LookupThemeResultOutput) Id() pulumi.StringOutput {
   167  	return o.ApplyT(func(v LookupThemeResult) string { return v.Id }).(pulumi.StringOutput)
   168  }
   169  
   170  // The time that the theme was last updated.
   171  func (o LookupThemeResultOutput) LastUpdatedTime() pulumi.StringOutput {
   172  	return o.ApplyT(func(v LookupThemeResult) string { return v.LastUpdatedTime }).(pulumi.StringOutput)
   173  }
   174  
   175  // Display name of the theme.
   176  func (o LookupThemeResultOutput) Name() pulumi.StringOutput {
   177  	return o.ApplyT(func(v LookupThemeResult) string { return v.Name }).(pulumi.StringOutput)
   178  }
   179  
   180  // A set of resource permissions on the theme. See permissions.
   181  func (o LookupThemeResultOutput) Permissions() GetThemePermissionArrayOutput {
   182  	return o.ApplyT(func(v LookupThemeResult) []GetThemePermission { return v.Permissions }).(GetThemePermissionArrayOutput)
   183  }
   184  
   185  // The theme creation status.
   186  func (o LookupThemeResultOutput) Status() pulumi.StringOutput {
   187  	return o.ApplyT(func(v LookupThemeResult) string { return v.Status }).(pulumi.StringOutput)
   188  }
   189  
   190  // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   191  func (o LookupThemeResultOutput) Tags() pulumi.StringMapOutput {
   192  	return o.ApplyT(func(v LookupThemeResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
   193  }
   194  
   195  func (o LookupThemeResultOutput) ThemeId() pulumi.StringOutput {
   196  	return o.ApplyT(func(v LookupThemeResult) string { return v.ThemeId }).(pulumi.StringOutput)
   197  }
   198  
   199  // A description of the current theme version being created/updated.
   200  func (o LookupThemeResultOutput) VersionDescription() pulumi.StringOutput {
   201  	return o.ApplyT(func(v LookupThemeResult) string { return v.VersionDescription }).(pulumi.StringOutput)
   202  }
   203  
   204  // The version number of the theme version.
   205  func (o LookupThemeResultOutput) VersionNumber() pulumi.IntOutput {
   206  	return o.ApplyT(func(v LookupThemeResult) int { return v.VersionNumber }).(pulumi.IntOutput)
   207  }
   208  
   209  func init() {
   210  	pulumi.RegisterOutputType(LookupThemeResultOutput{})
   211  }