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