github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/ssoadmin/trustedTokenIssuer.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  	"errors"
    11  	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal"
    12  	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    13  )
    14  
    15  // Resource for managing an AWS SSO Admin Trusted Token Issuer.
    16  //
    17  // ## Example Usage
    18  //
    19  // ## Import
    20  //
    21  // Using `pulumi import`, import SSO Admin Trusted Token Issuer using the `id`. For example:
    22  //
    23  // ```sh
    24  // $ pulumi import aws:ssoadmin/trustedTokenIssuer:TrustedTokenIssuer example arn:aws:sso::012345678901:trustedTokenIssuer/ssoins-lu1ye3gew4mbc7ju/tti-2657c556-9707-11ee-b9d1-0242ac120002
    25  // ```
    26  type TrustedTokenIssuer struct {
    27  	pulumi.CustomResourceState
    28  
    29  	// ARN of the trusted token issuer.
    30  	Arn pulumi.StringOutput `pulumi:"arn"`
    31  	// A unique, case-sensitive ID that you provide to ensure the idempotency of the request. AWS generates a random value when not provided.
    32  	ClientToken pulumi.StringPtrOutput `pulumi:"clientToken"`
    33  	// ARN of the instance of IAM Identity Center.
    34  	InstanceArn pulumi.StringOutput `pulumi:"instanceArn"`
    35  	// Name of the trusted token issuer.
    36  	Name pulumi.StringOutput `pulumi:"name"`
    37  	// Key-value mapping of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    38  	Tags pulumi.StringMapOutput `pulumi:"tags"`
    39  	// Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
    40  	//
    41  	// Deprecated: Please use `tags` instead.
    42  	TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"`
    43  	// A block that specifies settings that apply to the trusted token issuer, these change depending on the type you specify in `trustedTokenIssuerType`. Documented below.
    44  	TrustedTokenIssuerConfiguration TrustedTokenIssuerTrustedTokenIssuerConfigurationPtrOutput `pulumi:"trustedTokenIssuerConfiguration"`
    45  	// Specifies the type of the trusted token issuer. Valid values are `OIDC_JWT`
    46  	//
    47  	// The following arguments are optional:
    48  	TrustedTokenIssuerType pulumi.StringOutput `pulumi:"trustedTokenIssuerType"`
    49  }
    50  
    51  // NewTrustedTokenIssuer registers a new resource with the given unique name, arguments, and options.
    52  func NewTrustedTokenIssuer(ctx *pulumi.Context,
    53  	name string, args *TrustedTokenIssuerArgs, opts ...pulumi.ResourceOption) (*TrustedTokenIssuer, error) {
    54  	if args == nil {
    55  		return nil, errors.New("missing one or more required arguments")
    56  	}
    57  
    58  	if args.InstanceArn == nil {
    59  		return nil, errors.New("invalid value for required argument 'InstanceArn'")
    60  	}
    61  	if args.TrustedTokenIssuerType == nil {
    62  		return nil, errors.New("invalid value for required argument 'TrustedTokenIssuerType'")
    63  	}
    64  	opts = internal.PkgResourceDefaultOpts(opts)
    65  	var resource TrustedTokenIssuer
    66  	err := ctx.RegisterResource("aws:ssoadmin/trustedTokenIssuer:TrustedTokenIssuer", name, args, &resource, opts...)
    67  	if err != nil {
    68  		return nil, err
    69  	}
    70  	return &resource, nil
    71  }
    72  
    73  // GetTrustedTokenIssuer gets an existing TrustedTokenIssuer resource's state with the given name, ID, and optional
    74  // state properties that are used to uniquely qualify the lookup (nil if not required).
    75  func GetTrustedTokenIssuer(ctx *pulumi.Context,
    76  	name string, id pulumi.IDInput, state *TrustedTokenIssuerState, opts ...pulumi.ResourceOption) (*TrustedTokenIssuer, error) {
    77  	var resource TrustedTokenIssuer
    78  	err := ctx.ReadResource("aws:ssoadmin/trustedTokenIssuer:TrustedTokenIssuer", name, id, state, &resource, opts...)
    79  	if err != nil {
    80  		return nil, err
    81  	}
    82  	return &resource, nil
    83  }
    84  
    85  // Input properties used for looking up and filtering TrustedTokenIssuer resources.
    86  type trustedTokenIssuerState struct {
    87  	// ARN of the trusted token issuer.
    88  	Arn *string `pulumi:"arn"`
    89  	// A unique, case-sensitive ID that you provide to ensure the idempotency of the request. AWS generates a random value when not provided.
    90  	ClientToken *string `pulumi:"clientToken"`
    91  	// ARN of the instance of IAM Identity Center.
    92  	InstanceArn *string `pulumi:"instanceArn"`
    93  	// Name of the trusted token issuer.
    94  	Name *string `pulumi:"name"`
    95  	// Key-value mapping of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    96  	Tags map[string]string `pulumi:"tags"`
    97  	// Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
    98  	//
    99  	// Deprecated: Please use `tags` instead.
   100  	TagsAll map[string]string `pulumi:"tagsAll"`
   101  	// A block that specifies settings that apply to the trusted token issuer, these change depending on the type you specify in `trustedTokenIssuerType`. Documented below.
   102  	TrustedTokenIssuerConfiguration *TrustedTokenIssuerTrustedTokenIssuerConfiguration `pulumi:"trustedTokenIssuerConfiguration"`
   103  	// Specifies the type of the trusted token issuer. Valid values are `OIDC_JWT`
   104  	//
   105  	// The following arguments are optional:
   106  	TrustedTokenIssuerType *string `pulumi:"trustedTokenIssuerType"`
   107  }
   108  
   109  type TrustedTokenIssuerState struct {
   110  	// ARN of the trusted token issuer.
   111  	Arn pulumi.StringPtrInput
   112  	// A unique, case-sensitive ID that you provide to ensure the idempotency of the request. AWS generates a random value when not provided.
   113  	ClientToken pulumi.StringPtrInput
   114  	// ARN of the instance of IAM Identity Center.
   115  	InstanceArn pulumi.StringPtrInput
   116  	// Name of the trusted token issuer.
   117  	Name pulumi.StringPtrInput
   118  	// Key-value mapping of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   119  	Tags pulumi.StringMapInput
   120  	// Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   121  	//
   122  	// Deprecated: Please use `tags` instead.
   123  	TagsAll pulumi.StringMapInput
   124  	// A block that specifies settings that apply to the trusted token issuer, these change depending on the type you specify in `trustedTokenIssuerType`. Documented below.
   125  	TrustedTokenIssuerConfiguration TrustedTokenIssuerTrustedTokenIssuerConfigurationPtrInput
   126  	// Specifies the type of the trusted token issuer. Valid values are `OIDC_JWT`
   127  	//
   128  	// The following arguments are optional:
   129  	TrustedTokenIssuerType pulumi.StringPtrInput
   130  }
   131  
   132  func (TrustedTokenIssuerState) ElementType() reflect.Type {
   133  	return reflect.TypeOf((*trustedTokenIssuerState)(nil)).Elem()
   134  }
   135  
   136  type trustedTokenIssuerArgs struct {
   137  	// A unique, case-sensitive ID that you provide to ensure the idempotency of the request. AWS generates a random value when not provided.
   138  	ClientToken *string `pulumi:"clientToken"`
   139  	// ARN of the instance of IAM Identity Center.
   140  	InstanceArn string `pulumi:"instanceArn"`
   141  	// Name of the trusted token issuer.
   142  	Name *string `pulumi:"name"`
   143  	// Key-value mapping of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   144  	Tags map[string]string `pulumi:"tags"`
   145  	// A block that specifies settings that apply to the trusted token issuer, these change depending on the type you specify in `trustedTokenIssuerType`. Documented below.
   146  	TrustedTokenIssuerConfiguration *TrustedTokenIssuerTrustedTokenIssuerConfiguration `pulumi:"trustedTokenIssuerConfiguration"`
   147  	// Specifies the type of the trusted token issuer. Valid values are `OIDC_JWT`
   148  	//
   149  	// The following arguments are optional:
   150  	TrustedTokenIssuerType string `pulumi:"trustedTokenIssuerType"`
   151  }
   152  
   153  // The set of arguments for constructing a TrustedTokenIssuer resource.
   154  type TrustedTokenIssuerArgs struct {
   155  	// A unique, case-sensitive ID that you provide to ensure the idempotency of the request. AWS generates a random value when not provided.
   156  	ClientToken pulumi.StringPtrInput
   157  	// ARN of the instance of IAM Identity Center.
   158  	InstanceArn pulumi.StringInput
   159  	// Name of the trusted token issuer.
   160  	Name pulumi.StringPtrInput
   161  	// Key-value mapping of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   162  	Tags pulumi.StringMapInput
   163  	// A block that specifies settings that apply to the trusted token issuer, these change depending on the type you specify in `trustedTokenIssuerType`. Documented below.
   164  	TrustedTokenIssuerConfiguration TrustedTokenIssuerTrustedTokenIssuerConfigurationPtrInput
   165  	// Specifies the type of the trusted token issuer. Valid values are `OIDC_JWT`
   166  	//
   167  	// The following arguments are optional:
   168  	TrustedTokenIssuerType pulumi.StringInput
   169  }
   170  
   171  func (TrustedTokenIssuerArgs) ElementType() reflect.Type {
   172  	return reflect.TypeOf((*trustedTokenIssuerArgs)(nil)).Elem()
   173  }
   174  
   175  type TrustedTokenIssuerInput interface {
   176  	pulumi.Input
   177  
   178  	ToTrustedTokenIssuerOutput() TrustedTokenIssuerOutput
   179  	ToTrustedTokenIssuerOutputWithContext(ctx context.Context) TrustedTokenIssuerOutput
   180  }
   181  
   182  func (*TrustedTokenIssuer) ElementType() reflect.Type {
   183  	return reflect.TypeOf((**TrustedTokenIssuer)(nil)).Elem()
   184  }
   185  
   186  func (i *TrustedTokenIssuer) ToTrustedTokenIssuerOutput() TrustedTokenIssuerOutput {
   187  	return i.ToTrustedTokenIssuerOutputWithContext(context.Background())
   188  }
   189  
   190  func (i *TrustedTokenIssuer) ToTrustedTokenIssuerOutputWithContext(ctx context.Context) TrustedTokenIssuerOutput {
   191  	return pulumi.ToOutputWithContext(ctx, i).(TrustedTokenIssuerOutput)
   192  }
   193  
   194  // TrustedTokenIssuerArrayInput is an input type that accepts TrustedTokenIssuerArray and TrustedTokenIssuerArrayOutput values.
   195  // You can construct a concrete instance of `TrustedTokenIssuerArrayInput` via:
   196  //
   197  //	TrustedTokenIssuerArray{ TrustedTokenIssuerArgs{...} }
   198  type TrustedTokenIssuerArrayInput interface {
   199  	pulumi.Input
   200  
   201  	ToTrustedTokenIssuerArrayOutput() TrustedTokenIssuerArrayOutput
   202  	ToTrustedTokenIssuerArrayOutputWithContext(context.Context) TrustedTokenIssuerArrayOutput
   203  }
   204  
   205  type TrustedTokenIssuerArray []TrustedTokenIssuerInput
   206  
   207  func (TrustedTokenIssuerArray) ElementType() reflect.Type {
   208  	return reflect.TypeOf((*[]*TrustedTokenIssuer)(nil)).Elem()
   209  }
   210  
   211  func (i TrustedTokenIssuerArray) ToTrustedTokenIssuerArrayOutput() TrustedTokenIssuerArrayOutput {
   212  	return i.ToTrustedTokenIssuerArrayOutputWithContext(context.Background())
   213  }
   214  
   215  func (i TrustedTokenIssuerArray) ToTrustedTokenIssuerArrayOutputWithContext(ctx context.Context) TrustedTokenIssuerArrayOutput {
   216  	return pulumi.ToOutputWithContext(ctx, i).(TrustedTokenIssuerArrayOutput)
   217  }
   218  
   219  // TrustedTokenIssuerMapInput is an input type that accepts TrustedTokenIssuerMap and TrustedTokenIssuerMapOutput values.
   220  // You can construct a concrete instance of `TrustedTokenIssuerMapInput` via:
   221  //
   222  //	TrustedTokenIssuerMap{ "key": TrustedTokenIssuerArgs{...} }
   223  type TrustedTokenIssuerMapInput interface {
   224  	pulumi.Input
   225  
   226  	ToTrustedTokenIssuerMapOutput() TrustedTokenIssuerMapOutput
   227  	ToTrustedTokenIssuerMapOutputWithContext(context.Context) TrustedTokenIssuerMapOutput
   228  }
   229  
   230  type TrustedTokenIssuerMap map[string]TrustedTokenIssuerInput
   231  
   232  func (TrustedTokenIssuerMap) ElementType() reflect.Type {
   233  	return reflect.TypeOf((*map[string]*TrustedTokenIssuer)(nil)).Elem()
   234  }
   235  
   236  func (i TrustedTokenIssuerMap) ToTrustedTokenIssuerMapOutput() TrustedTokenIssuerMapOutput {
   237  	return i.ToTrustedTokenIssuerMapOutputWithContext(context.Background())
   238  }
   239  
   240  func (i TrustedTokenIssuerMap) ToTrustedTokenIssuerMapOutputWithContext(ctx context.Context) TrustedTokenIssuerMapOutput {
   241  	return pulumi.ToOutputWithContext(ctx, i).(TrustedTokenIssuerMapOutput)
   242  }
   243  
   244  type TrustedTokenIssuerOutput struct{ *pulumi.OutputState }
   245  
   246  func (TrustedTokenIssuerOutput) ElementType() reflect.Type {
   247  	return reflect.TypeOf((**TrustedTokenIssuer)(nil)).Elem()
   248  }
   249  
   250  func (o TrustedTokenIssuerOutput) ToTrustedTokenIssuerOutput() TrustedTokenIssuerOutput {
   251  	return o
   252  }
   253  
   254  func (o TrustedTokenIssuerOutput) ToTrustedTokenIssuerOutputWithContext(ctx context.Context) TrustedTokenIssuerOutput {
   255  	return o
   256  }
   257  
   258  // ARN of the trusted token issuer.
   259  func (o TrustedTokenIssuerOutput) Arn() pulumi.StringOutput {
   260  	return o.ApplyT(func(v *TrustedTokenIssuer) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput)
   261  }
   262  
   263  // A unique, case-sensitive ID that you provide to ensure the idempotency of the request. AWS generates a random value when not provided.
   264  func (o TrustedTokenIssuerOutput) ClientToken() pulumi.StringPtrOutput {
   265  	return o.ApplyT(func(v *TrustedTokenIssuer) pulumi.StringPtrOutput { return v.ClientToken }).(pulumi.StringPtrOutput)
   266  }
   267  
   268  // ARN of the instance of IAM Identity Center.
   269  func (o TrustedTokenIssuerOutput) InstanceArn() pulumi.StringOutput {
   270  	return o.ApplyT(func(v *TrustedTokenIssuer) pulumi.StringOutput { return v.InstanceArn }).(pulumi.StringOutput)
   271  }
   272  
   273  // Name of the trusted token issuer.
   274  func (o TrustedTokenIssuerOutput) Name() pulumi.StringOutput {
   275  	return o.ApplyT(func(v *TrustedTokenIssuer) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
   276  }
   277  
   278  // Key-value mapping of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   279  func (o TrustedTokenIssuerOutput) Tags() pulumi.StringMapOutput {
   280  	return o.ApplyT(func(v *TrustedTokenIssuer) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
   281  }
   282  
   283  // Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   284  //
   285  // Deprecated: Please use `tags` instead.
   286  func (o TrustedTokenIssuerOutput) TagsAll() pulumi.StringMapOutput {
   287  	return o.ApplyT(func(v *TrustedTokenIssuer) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput)
   288  }
   289  
   290  // A block that specifies settings that apply to the trusted token issuer, these change depending on the type you specify in `trustedTokenIssuerType`. Documented below.
   291  func (o TrustedTokenIssuerOutput) TrustedTokenIssuerConfiguration() TrustedTokenIssuerTrustedTokenIssuerConfigurationPtrOutput {
   292  	return o.ApplyT(func(v *TrustedTokenIssuer) TrustedTokenIssuerTrustedTokenIssuerConfigurationPtrOutput {
   293  		return v.TrustedTokenIssuerConfiguration
   294  	}).(TrustedTokenIssuerTrustedTokenIssuerConfigurationPtrOutput)
   295  }
   296  
   297  // Specifies the type of the trusted token issuer. Valid values are `OIDC_JWT`
   298  //
   299  // The following arguments are optional:
   300  func (o TrustedTokenIssuerOutput) TrustedTokenIssuerType() pulumi.StringOutput {
   301  	return o.ApplyT(func(v *TrustedTokenIssuer) pulumi.StringOutput { return v.TrustedTokenIssuerType }).(pulumi.StringOutput)
   302  }
   303  
   304  type TrustedTokenIssuerArrayOutput struct{ *pulumi.OutputState }
   305  
   306  func (TrustedTokenIssuerArrayOutput) ElementType() reflect.Type {
   307  	return reflect.TypeOf((*[]*TrustedTokenIssuer)(nil)).Elem()
   308  }
   309  
   310  func (o TrustedTokenIssuerArrayOutput) ToTrustedTokenIssuerArrayOutput() TrustedTokenIssuerArrayOutput {
   311  	return o
   312  }
   313  
   314  func (o TrustedTokenIssuerArrayOutput) ToTrustedTokenIssuerArrayOutputWithContext(ctx context.Context) TrustedTokenIssuerArrayOutput {
   315  	return o
   316  }
   317  
   318  func (o TrustedTokenIssuerArrayOutput) Index(i pulumi.IntInput) TrustedTokenIssuerOutput {
   319  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *TrustedTokenIssuer {
   320  		return vs[0].([]*TrustedTokenIssuer)[vs[1].(int)]
   321  	}).(TrustedTokenIssuerOutput)
   322  }
   323  
   324  type TrustedTokenIssuerMapOutput struct{ *pulumi.OutputState }
   325  
   326  func (TrustedTokenIssuerMapOutput) ElementType() reflect.Type {
   327  	return reflect.TypeOf((*map[string]*TrustedTokenIssuer)(nil)).Elem()
   328  }
   329  
   330  func (o TrustedTokenIssuerMapOutput) ToTrustedTokenIssuerMapOutput() TrustedTokenIssuerMapOutput {
   331  	return o
   332  }
   333  
   334  func (o TrustedTokenIssuerMapOutput) ToTrustedTokenIssuerMapOutputWithContext(ctx context.Context) TrustedTokenIssuerMapOutput {
   335  	return o
   336  }
   337  
   338  func (o TrustedTokenIssuerMapOutput) MapIndex(k pulumi.StringInput) TrustedTokenIssuerOutput {
   339  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *TrustedTokenIssuer {
   340  		return vs[0].(map[string]*TrustedTokenIssuer)[vs[1].(string)]
   341  	}).(TrustedTokenIssuerOutput)
   342  }
   343  
   344  func init() {
   345  	pulumi.RegisterInputType(reflect.TypeOf((*TrustedTokenIssuerInput)(nil)).Elem(), &TrustedTokenIssuer{})
   346  	pulumi.RegisterInputType(reflect.TypeOf((*TrustedTokenIssuerArrayInput)(nil)).Elem(), TrustedTokenIssuerArray{})
   347  	pulumi.RegisterInputType(reflect.TypeOf((*TrustedTokenIssuerMapInput)(nil)).Elem(), TrustedTokenIssuerMap{})
   348  	pulumi.RegisterOutputType(TrustedTokenIssuerOutput{})
   349  	pulumi.RegisterOutputType(TrustedTokenIssuerArrayOutput{})
   350  	pulumi.RegisterOutputType(TrustedTokenIssuerMapOutput{})
   351  }