github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/appconfig/application.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 appconfig
     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  // Provides an AppConfig Application resource.
    15  //
    16  // ## Example Usage
    17  //
    18  // <!--Start PulumiCodeChooser -->
    19  // ```go
    20  // package main
    21  //
    22  // import (
    23  //
    24  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/appconfig"
    25  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    26  //
    27  // )
    28  //
    29  //	func main() {
    30  //		pulumi.Run(func(ctx *pulumi.Context) error {
    31  //			_, err := appconfig.NewApplication(ctx, "example", &appconfig.ApplicationArgs{
    32  //				Name:        pulumi.String("example-application-tf"),
    33  //				Description: pulumi.String("Example AppConfig Application"),
    34  //				Tags: pulumi.StringMap{
    35  //					"Type": pulumi.String("AppConfig Application"),
    36  //				},
    37  //			})
    38  //			if err != nil {
    39  //				return err
    40  //			}
    41  //			return nil
    42  //		})
    43  //	}
    44  //
    45  // ```
    46  // <!--End PulumiCodeChooser -->
    47  //
    48  // ## Import
    49  //
    50  // Using `pulumi import`, import AppConfig Applications using their application ID. For example:
    51  //
    52  // ```sh
    53  // $ pulumi import aws:appconfig/application:Application example 71rxuzt
    54  // ```
    55  type Application struct {
    56  	pulumi.CustomResourceState
    57  
    58  	// ARN of the AppConfig Application.
    59  	Arn pulumi.StringOutput `pulumi:"arn"`
    60  	// Description of the application. Can be at most 1024 characters.
    61  	Description pulumi.StringPtrOutput `pulumi:"description"`
    62  	// Name for the application. Must be between 1 and 64 characters in length.
    63  	Name pulumi.StringOutput `pulumi:"name"`
    64  	// Map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    65  	Tags pulumi.StringMapOutput `pulumi:"tags"`
    66  	// Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
    67  	//
    68  	// Deprecated: Please use `tags` instead.
    69  	TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"`
    70  }
    71  
    72  // NewApplication registers a new resource with the given unique name, arguments, and options.
    73  func NewApplication(ctx *pulumi.Context,
    74  	name string, args *ApplicationArgs, opts ...pulumi.ResourceOption) (*Application, error) {
    75  	if args == nil {
    76  		args = &ApplicationArgs{}
    77  	}
    78  
    79  	opts = internal.PkgResourceDefaultOpts(opts)
    80  	var resource Application
    81  	err := ctx.RegisterResource("aws:appconfig/application:Application", name, args, &resource, opts...)
    82  	if err != nil {
    83  		return nil, err
    84  	}
    85  	return &resource, nil
    86  }
    87  
    88  // GetApplication gets an existing Application resource's state with the given name, ID, and optional
    89  // state properties that are used to uniquely qualify the lookup (nil if not required).
    90  func GetApplication(ctx *pulumi.Context,
    91  	name string, id pulumi.IDInput, state *ApplicationState, opts ...pulumi.ResourceOption) (*Application, error) {
    92  	var resource Application
    93  	err := ctx.ReadResource("aws:appconfig/application:Application", name, id, state, &resource, opts...)
    94  	if err != nil {
    95  		return nil, err
    96  	}
    97  	return &resource, nil
    98  }
    99  
   100  // Input properties used for looking up and filtering Application resources.
   101  type applicationState struct {
   102  	// ARN of the AppConfig Application.
   103  	Arn *string `pulumi:"arn"`
   104  	// Description of the application. Can be at most 1024 characters.
   105  	Description *string `pulumi:"description"`
   106  	// Name for the application. Must be between 1 and 64 characters in length.
   107  	Name *string `pulumi:"name"`
   108  	// Map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   109  	Tags map[string]string `pulumi:"tags"`
   110  	// Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   111  	//
   112  	// Deprecated: Please use `tags` instead.
   113  	TagsAll map[string]string `pulumi:"tagsAll"`
   114  }
   115  
   116  type ApplicationState struct {
   117  	// ARN of the AppConfig Application.
   118  	Arn pulumi.StringPtrInput
   119  	// Description of the application. Can be at most 1024 characters.
   120  	Description pulumi.StringPtrInput
   121  	// Name for the application. Must be between 1 and 64 characters in length.
   122  	Name pulumi.StringPtrInput
   123  	// Map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   124  	Tags pulumi.StringMapInput
   125  	// Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   126  	//
   127  	// Deprecated: Please use `tags` instead.
   128  	TagsAll pulumi.StringMapInput
   129  }
   130  
   131  func (ApplicationState) ElementType() reflect.Type {
   132  	return reflect.TypeOf((*applicationState)(nil)).Elem()
   133  }
   134  
   135  type applicationArgs struct {
   136  	// Description of the application. Can be at most 1024 characters.
   137  	Description *string `pulumi:"description"`
   138  	// Name for the application. Must be between 1 and 64 characters in length.
   139  	Name *string `pulumi:"name"`
   140  	// Map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   141  	Tags map[string]string `pulumi:"tags"`
   142  }
   143  
   144  // The set of arguments for constructing a Application resource.
   145  type ApplicationArgs struct {
   146  	// Description of the application. Can be at most 1024 characters.
   147  	Description pulumi.StringPtrInput
   148  	// Name for the application. Must be between 1 and 64 characters in length.
   149  	Name pulumi.StringPtrInput
   150  	// Map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   151  	Tags pulumi.StringMapInput
   152  }
   153  
   154  func (ApplicationArgs) ElementType() reflect.Type {
   155  	return reflect.TypeOf((*applicationArgs)(nil)).Elem()
   156  }
   157  
   158  type ApplicationInput interface {
   159  	pulumi.Input
   160  
   161  	ToApplicationOutput() ApplicationOutput
   162  	ToApplicationOutputWithContext(ctx context.Context) ApplicationOutput
   163  }
   164  
   165  func (*Application) ElementType() reflect.Type {
   166  	return reflect.TypeOf((**Application)(nil)).Elem()
   167  }
   168  
   169  func (i *Application) ToApplicationOutput() ApplicationOutput {
   170  	return i.ToApplicationOutputWithContext(context.Background())
   171  }
   172  
   173  func (i *Application) ToApplicationOutputWithContext(ctx context.Context) ApplicationOutput {
   174  	return pulumi.ToOutputWithContext(ctx, i).(ApplicationOutput)
   175  }
   176  
   177  // ApplicationArrayInput is an input type that accepts ApplicationArray and ApplicationArrayOutput values.
   178  // You can construct a concrete instance of `ApplicationArrayInput` via:
   179  //
   180  //	ApplicationArray{ ApplicationArgs{...} }
   181  type ApplicationArrayInput interface {
   182  	pulumi.Input
   183  
   184  	ToApplicationArrayOutput() ApplicationArrayOutput
   185  	ToApplicationArrayOutputWithContext(context.Context) ApplicationArrayOutput
   186  }
   187  
   188  type ApplicationArray []ApplicationInput
   189  
   190  func (ApplicationArray) ElementType() reflect.Type {
   191  	return reflect.TypeOf((*[]*Application)(nil)).Elem()
   192  }
   193  
   194  func (i ApplicationArray) ToApplicationArrayOutput() ApplicationArrayOutput {
   195  	return i.ToApplicationArrayOutputWithContext(context.Background())
   196  }
   197  
   198  func (i ApplicationArray) ToApplicationArrayOutputWithContext(ctx context.Context) ApplicationArrayOutput {
   199  	return pulumi.ToOutputWithContext(ctx, i).(ApplicationArrayOutput)
   200  }
   201  
   202  // ApplicationMapInput is an input type that accepts ApplicationMap and ApplicationMapOutput values.
   203  // You can construct a concrete instance of `ApplicationMapInput` via:
   204  //
   205  //	ApplicationMap{ "key": ApplicationArgs{...} }
   206  type ApplicationMapInput interface {
   207  	pulumi.Input
   208  
   209  	ToApplicationMapOutput() ApplicationMapOutput
   210  	ToApplicationMapOutputWithContext(context.Context) ApplicationMapOutput
   211  }
   212  
   213  type ApplicationMap map[string]ApplicationInput
   214  
   215  func (ApplicationMap) ElementType() reflect.Type {
   216  	return reflect.TypeOf((*map[string]*Application)(nil)).Elem()
   217  }
   218  
   219  func (i ApplicationMap) ToApplicationMapOutput() ApplicationMapOutput {
   220  	return i.ToApplicationMapOutputWithContext(context.Background())
   221  }
   222  
   223  func (i ApplicationMap) ToApplicationMapOutputWithContext(ctx context.Context) ApplicationMapOutput {
   224  	return pulumi.ToOutputWithContext(ctx, i).(ApplicationMapOutput)
   225  }
   226  
   227  type ApplicationOutput struct{ *pulumi.OutputState }
   228  
   229  func (ApplicationOutput) ElementType() reflect.Type {
   230  	return reflect.TypeOf((**Application)(nil)).Elem()
   231  }
   232  
   233  func (o ApplicationOutput) ToApplicationOutput() ApplicationOutput {
   234  	return o
   235  }
   236  
   237  func (o ApplicationOutput) ToApplicationOutputWithContext(ctx context.Context) ApplicationOutput {
   238  	return o
   239  }
   240  
   241  // ARN of the AppConfig Application.
   242  func (o ApplicationOutput) Arn() pulumi.StringOutput {
   243  	return o.ApplyT(func(v *Application) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput)
   244  }
   245  
   246  // Description of the application. Can be at most 1024 characters.
   247  func (o ApplicationOutput) Description() pulumi.StringPtrOutput {
   248  	return o.ApplyT(func(v *Application) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
   249  }
   250  
   251  // Name for the application. Must be between 1 and 64 characters in length.
   252  func (o ApplicationOutput) Name() pulumi.StringOutput {
   253  	return o.ApplyT(func(v *Application) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
   254  }
   255  
   256  // Map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   257  func (o ApplicationOutput) Tags() pulumi.StringMapOutput {
   258  	return o.ApplyT(func(v *Application) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
   259  }
   260  
   261  // Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   262  //
   263  // Deprecated: Please use `tags` instead.
   264  func (o ApplicationOutput) TagsAll() pulumi.StringMapOutput {
   265  	return o.ApplyT(func(v *Application) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput)
   266  }
   267  
   268  type ApplicationArrayOutput struct{ *pulumi.OutputState }
   269  
   270  func (ApplicationArrayOutput) ElementType() reflect.Type {
   271  	return reflect.TypeOf((*[]*Application)(nil)).Elem()
   272  }
   273  
   274  func (o ApplicationArrayOutput) ToApplicationArrayOutput() ApplicationArrayOutput {
   275  	return o
   276  }
   277  
   278  func (o ApplicationArrayOutput) ToApplicationArrayOutputWithContext(ctx context.Context) ApplicationArrayOutput {
   279  	return o
   280  }
   281  
   282  func (o ApplicationArrayOutput) Index(i pulumi.IntInput) ApplicationOutput {
   283  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Application {
   284  		return vs[0].([]*Application)[vs[1].(int)]
   285  	}).(ApplicationOutput)
   286  }
   287  
   288  type ApplicationMapOutput struct{ *pulumi.OutputState }
   289  
   290  func (ApplicationMapOutput) ElementType() reflect.Type {
   291  	return reflect.TypeOf((*map[string]*Application)(nil)).Elem()
   292  }
   293  
   294  func (o ApplicationMapOutput) ToApplicationMapOutput() ApplicationMapOutput {
   295  	return o
   296  }
   297  
   298  func (o ApplicationMapOutput) ToApplicationMapOutputWithContext(ctx context.Context) ApplicationMapOutput {
   299  	return o
   300  }
   301  
   302  func (o ApplicationMapOutput) MapIndex(k pulumi.StringInput) ApplicationOutput {
   303  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Application {
   304  		return vs[0].(map[string]*Application)[vs[1].(string)]
   305  	}).(ApplicationOutput)
   306  }
   307  
   308  func init() {
   309  	pulumi.RegisterInputType(reflect.TypeOf((*ApplicationInput)(nil)).Elem(), &Application{})
   310  	pulumi.RegisterInputType(reflect.TypeOf((*ApplicationArrayInput)(nil)).Elem(), ApplicationArray{})
   311  	pulumi.RegisterInputType(reflect.TypeOf((*ApplicationMapInput)(nil)).Elem(), ApplicationMap{})
   312  	pulumi.RegisterOutputType(ApplicationOutput{})
   313  	pulumi.RegisterOutputType(ApplicationArrayOutput{})
   314  	pulumi.RegisterOutputType(ApplicationMapOutput{})
   315  }