github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/m2/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 m2 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 Mainframe Modernization Application](https://docs.aws.amazon.com/m2/latest/userguide/applications-m2.html). 16 // 17 // ## Example Usage 18 // 19 // ### Basic Usage 20 // 21 // <!--Start PulumiCodeChooser --> 22 // ```go 23 // package main 24 // 25 // import ( 26 // 27 // "fmt" 28 // 29 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/m2" 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 := m2.NewApplication(ctx, "example", &m2.ApplicationArgs{ 37 // Name: pulumi.String("Example"), 38 // EngineType: pulumi.String("bluage"), 39 // Definition: &m2.ApplicationDefinitionArgs{ 40 // Content: pulumi.String(fmt.Sprintf(`{ 41 // "definition": { 42 // "listeners": [ 43 // { 44 // "port": 8196, 45 // "type": "http" 46 // } 47 // ], 48 // "ba-application": { 49 // "app-location": "%v/PlanetsDemo-v1.zip" 50 // } 51 // }, 52 // "source-locations": [ 53 // { 54 // "source-id": "s3-source", 55 // "source-type": "s3", 56 // "properties": { 57 // "s3-bucket": "example-bucket", 58 // "s3-key-prefix": "v1" 59 // } 60 // } 61 // ], 62 // "template-version": "2.0" 63 // } 64 // 65 // `, s3_source)), 66 // 67 // }, 68 // }) 69 // if err != nil { 70 // return err 71 // } 72 // return nil 73 // }) 74 // } 75 // 76 // ``` 77 // <!--End PulumiCodeChooser --> 78 // 79 // ## Import 80 // 81 // Using `pulumi import`, import Mainframe Modernization Application using the `01234567890abcdef012345678`. For example: 82 // 83 // ```sh 84 // $ pulumi import aws:m2/application:Application example 01234567890abcdef012345678 85 // ``` 86 type Application struct { 87 pulumi.CustomResourceState 88 89 // Id of the Application. 90 ApplicationId pulumi.StringOutput `pulumi:"applicationId"` 91 // ARN of the Application. 92 Arn pulumi.StringOutput `pulumi:"arn"` 93 // Current version of the application deployed. 94 CurrentVersion pulumi.IntOutput `pulumi:"currentVersion"` 95 // The application definition for this application. You can specify either inline JSON or an S3 bucket location. 96 Definition ApplicationDefinitionPtrOutput `pulumi:"definition"` 97 // Description of the application. 98 Description pulumi.StringPtrOutput `pulumi:"description"` 99 // Engine type must be `microfocus | bluage`. 100 EngineType pulumi.StringOutput `pulumi:"engineType"` 101 // KMS Key to use for the Application. 102 KmsKeyId pulumi.StringPtrOutput `pulumi:"kmsKeyId"` 103 // Unique identifier of the application. 104 // 105 // The following arguments are optional: 106 Name pulumi.StringOutput `pulumi:"name"` 107 // ARN of role for application to use to access AWS resources. 108 RoleArn pulumi.StringPtrOutput `pulumi:"roleArn"` 109 // A map of tags assigned to the WorkSpaces Connection Alias. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 110 Tags pulumi.StringMapOutput `pulumi:"tags"` 111 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 112 // 113 // Deprecated: Please use `tags` instead. 114 TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"` 115 Timeouts ApplicationTimeoutsPtrOutput `pulumi:"timeouts"` 116 } 117 118 // NewApplication registers a new resource with the given unique name, arguments, and options. 119 func NewApplication(ctx *pulumi.Context, 120 name string, args *ApplicationArgs, opts ...pulumi.ResourceOption) (*Application, error) { 121 if args == nil { 122 return nil, errors.New("missing one or more required arguments") 123 } 124 125 if args.EngineType == nil { 126 return nil, errors.New("invalid value for required argument 'EngineType'") 127 } 128 opts = internal.PkgResourceDefaultOpts(opts) 129 var resource Application 130 err := ctx.RegisterResource("aws:m2/application:Application", name, args, &resource, opts...) 131 if err != nil { 132 return nil, err 133 } 134 return &resource, nil 135 } 136 137 // GetApplication gets an existing Application resource's state with the given name, ID, and optional 138 // state properties that are used to uniquely qualify the lookup (nil if not required). 139 func GetApplication(ctx *pulumi.Context, 140 name string, id pulumi.IDInput, state *ApplicationState, opts ...pulumi.ResourceOption) (*Application, error) { 141 var resource Application 142 err := ctx.ReadResource("aws:m2/application:Application", name, id, state, &resource, opts...) 143 if err != nil { 144 return nil, err 145 } 146 return &resource, nil 147 } 148 149 // Input properties used for looking up and filtering Application resources. 150 type applicationState struct { 151 // Id of the Application. 152 ApplicationId *string `pulumi:"applicationId"` 153 // ARN of the Application. 154 Arn *string `pulumi:"arn"` 155 // Current version of the application deployed. 156 CurrentVersion *int `pulumi:"currentVersion"` 157 // The application definition for this application. You can specify either inline JSON or an S3 bucket location. 158 Definition *ApplicationDefinition `pulumi:"definition"` 159 // Description of the application. 160 Description *string `pulumi:"description"` 161 // Engine type must be `microfocus | bluage`. 162 EngineType *string `pulumi:"engineType"` 163 // KMS Key to use for the Application. 164 KmsKeyId *string `pulumi:"kmsKeyId"` 165 // Unique identifier of the application. 166 // 167 // The following arguments are optional: 168 Name *string `pulumi:"name"` 169 // ARN of role for application to use to access AWS resources. 170 RoleArn *string `pulumi:"roleArn"` 171 // A map of tags assigned to the WorkSpaces Connection Alias. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 172 Tags map[string]string `pulumi:"tags"` 173 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 174 // 175 // Deprecated: Please use `tags` instead. 176 TagsAll map[string]string `pulumi:"tagsAll"` 177 Timeouts *ApplicationTimeouts `pulumi:"timeouts"` 178 } 179 180 type ApplicationState struct { 181 // Id of the Application. 182 ApplicationId pulumi.StringPtrInput 183 // ARN of the Application. 184 Arn pulumi.StringPtrInput 185 // Current version of the application deployed. 186 CurrentVersion pulumi.IntPtrInput 187 // The application definition for this application. You can specify either inline JSON or an S3 bucket location. 188 Definition ApplicationDefinitionPtrInput 189 // Description of the application. 190 Description pulumi.StringPtrInput 191 // Engine type must be `microfocus | bluage`. 192 EngineType pulumi.StringPtrInput 193 // KMS Key to use for the Application. 194 KmsKeyId pulumi.StringPtrInput 195 // Unique identifier of the application. 196 // 197 // The following arguments are optional: 198 Name pulumi.StringPtrInput 199 // ARN of role for application to use to access AWS resources. 200 RoleArn pulumi.StringPtrInput 201 // A map of tags assigned to the WorkSpaces Connection Alias. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 202 Tags pulumi.StringMapInput 203 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 204 // 205 // Deprecated: Please use `tags` instead. 206 TagsAll pulumi.StringMapInput 207 Timeouts ApplicationTimeoutsPtrInput 208 } 209 210 func (ApplicationState) ElementType() reflect.Type { 211 return reflect.TypeOf((*applicationState)(nil)).Elem() 212 } 213 214 type applicationArgs struct { 215 // The application definition for this application. You can specify either inline JSON or an S3 bucket location. 216 Definition *ApplicationDefinition `pulumi:"definition"` 217 // Description of the application. 218 Description *string `pulumi:"description"` 219 // Engine type must be `microfocus | bluage`. 220 EngineType string `pulumi:"engineType"` 221 // KMS Key to use for the Application. 222 KmsKeyId *string `pulumi:"kmsKeyId"` 223 // Unique identifier of the application. 224 // 225 // The following arguments are optional: 226 Name *string `pulumi:"name"` 227 // ARN of role for application to use to access AWS resources. 228 RoleArn *string `pulumi:"roleArn"` 229 // A map of tags assigned to the WorkSpaces Connection Alias. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 230 Tags map[string]string `pulumi:"tags"` 231 Timeouts *ApplicationTimeouts `pulumi:"timeouts"` 232 } 233 234 // The set of arguments for constructing a Application resource. 235 type ApplicationArgs struct { 236 // The application definition for this application. You can specify either inline JSON or an S3 bucket location. 237 Definition ApplicationDefinitionPtrInput 238 // Description of the application. 239 Description pulumi.StringPtrInput 240 // Engine type must be `microfocus | bluage`. 241 EngineType pulumi.StringInput 242 // KMS Key to use for the Application. 243 KmsKeyId pulumi.StringPtrInput 244 // Unique identifier of the application. 245 // 246 // The following arguments are optional: 247 Name pulumi.StringPtrInput 248 // ARN of role for application to use to access AWS resources. 249 RoleArn pulumi.StringPtrInput 250 // A map of tags assigned to the WorkSpaces Connection Alias. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 251 Tags pulumi.StringMapInput 252 Timeouts ApplicationTimeoutsPtrInput 253 } 254 255 func (ApplicationArgs) ElementType() reflect.Type { 256 return reflect.TypeOf((*applicationArgs)(nil)).Elem() 257 } 258 259 type ApplicationInput interface { 260 pulumi.Input 261 262 ToApplicationOutput() ApplicationOutput 263 ToApplicationOutputWithContext(ctx context.Context) ApplicationOutput 264 } 265 266 func (*Application) ElementType() reflect.Type { 267 return reflect.TypeOf((**Application)(nil)).Elem() 268 } 269 270 func (i *Application) ToApplicationOutput() ApplicationOutput { 271 return i.ToApplicationOutputWithContext(context.Background()) 272 } 273 274 func (i *Application) ToApplicationOutputWithContext(ctx context.Context) ApplicationOutput { 275 return pulumi.ToOutputWithContext(ctx, i).(ApplicationOutput) 276 } 277 278 // ApplicationArrayInput is an input type that accepts ApplicationArray and ApplicationArrayOutput values. 279 // You can construct a concrete instance of `ApplicationArrayInput` via: 280 // 281 // ApplicationArray{ ApplicationArgs{...} } 282 type ApplicationArrayInput interface { 283 pulumi.Input 284 285 ToApplicationArrayOutput() ApplicationArrayOutput 286 ToApplicationArrayOutputWithContext(context.Context) ApplicationArrayOutput 287 } 288 289 type ApplicationArray []ApplicationInput 290 291 func (ApplicationArray) ElementType() reflect.Type { 292 return reflect.TypeOf((*[]*Application)(nil)).Elem() 293 } 294 295 func (i ApplicationArray) ToApplicationArrayOutput() ApplicationArrayOutput { 296 return i.ToApplicationArrayOutputWithContext(context.Background()) 297 } 298 299 func (i ApplicationArray) ToApplicationArrayOutputWithContext(ctx context.Context) ApplicationArrayOutput { 300 return pulumi.ToOutputWithContext(ctx, i).(ApplicationArrayOutput) 301 } 302 303 // ApplicationMapInput is an input type that accepts ApplicationMap and ApplicationMapOutput values. 304 // You can construct a concrete instance of `ApplicationMapInput` via: 305 // 306 // ApplicationMap{ "key": ApplicationArgs{...} } 307 type ApplicationMapInput interface { 308 pulumi.Input 309 310 ToApplicationMapOutput() ApplicationMapOutput 311 ToApplicationMapOutputWithContext(context.Context) ApplicationMapOutput 312 } 313 314 type ApplicationMap map[string]ApplicationInput 315 316 func (ApplicationMap) ElementType() reflect.Type { 317 return reflect.TypeOf((*map[string]*Application)(nil)).Elem() 318 } 319 320 func (i ApplicationMap) ToApplicationMapOutput() ApplicationMapOutput { 321 return i.ToApplicationMapOutputWithContext(context.Background()) 322 } 323 324 func (i ApplicationMap) ToApplicationMapOutputWithContext(ctx context.Context) ApplicationMapOutput { 325 return pulumi.ToOutputWithContext(ctx, i).(ApplicationMapOutput) 326 } 327 328 type ApplicationOutput struct{ *pulumi.OutputState } 329 330 func (ApplicationOutput) ElementType() reflect.Type { 331 return reflect.TypeOf((**Application)(nil)).Elem() 332 } 333 334 func (o ApplicationOutput) ToApplicationOutput() ApplicationOutput { 335 return o 336 } 337 338 func (o ApplicationOutput) ToApplicationOutputWithContext(ctx context.Context) ApplicationOutput { 339 return o 340 } 341 342 // Id of the Application. 343 func (o ApplicationOutput) ApplicationId() pulumi.StringOutput { 344 return o.ApplyT(func(v *Application) pulumi.StringOutput { return v.ApplicationId }).(pulumi.StringOutput) 345 } 346 347 // ARN of the Application. 348 func (o ApplicationOutput) Arn() pulumi.StringOutput { 349 return o.ApplyT(func(v *Application) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput) 350 } 351 352 // Current version of the application deployed. 353 func (o ApplicationOutput) CurrentVersion() pulumi.IntOutput { 354 return o.ApplyT(func(v *Application) pulumi.IntOutput { return v.CurrentVersion }).(pulumi.IntOutput) 355 } 356 357 // The application definition for this application. You can specify either inline JSON or an S3 bucket location. 358 func (o ApplicationOutput) Definition() ApplicationDefinitionPtrOutput { 359 return o.ApplyT(func(v *Application) ApplicationDefinitionPtrOutput { return v.Definition }).(ApplicationDefinitionPtrOutput) 360 } 361 362 // Description of the application. 363 func (o ApplicationOutput) Description() pulumi.StringPtrOutput { 364 return o.ApplyT(func(v *Application) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) 365 } 366 367 // Engine type must be `microfocus | bluage`. 368 func (o ApplicationOutput) EngineType() pulumi.StringOutput { 369 return o.ApplyT(func(v *Application) pulumi.StringOutput { return v.EngineType }).(pulumi.StringOutput) 370 } 371 372 // KMS Key to use for the Application. 373 func (o ApplicationOutput) KmsKeyId() pulumi.StringPtrOutput { 374 return o.ApplyT(func(v *Application) pulumi.StringPtrOutput { return v.KmsKeyId }).(pulumi.StringPtrOutput) 375 } 376 377 // Unique identifier of the application. 378 // 379 // The following arguments are optional: 380 func (o ApplicationOutput) Name() pulumi.StringOutput { 381 return o.ApplyT(func(v *Application) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) 382 } 383 384 // ARN of role for application to use to access AWS resources. 385 func (o ApplicationOutput) RoleArn() pulumi.StringPtrOutput { 386 return o.ApplyT(func(v *Application) pulumi.StringPtrOutput { return v.RoleArn }).(pulumi.StringPtrOutput) 387 } 388 389 // A map of tags assigned to the WorkSpaces Connection Alias. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 390 func (o ApplicationOutput) Tags() pulumi.StringMapOutput { 391 return o.ApplyT(func(v *Application) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) 392 } 393 394 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 395 // 396 // Deprecated: Please use `tags` instead. 397 func (o ApplicationOutput) TagsAll() pulumi.StringMapOutput { 398 return o.ApplyT(func(v *Application) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput) 399 } 400 401 func (o ApplicationOutput) Timeouts() ApplicationTimeoutsPtrOutput { 402 return o.ApplyT(func(v *Application) ApplicationTimeoutsPtrOutput { return v.Timeouts }).(ApplicationTimeoutsPtrOutput) 403 } 404 405 type ApplicationArrayOutput struct{ *pulumi.OutputState } 406 407 func (ApplicationArrayOutput) ElementType() reflect.Type { 408 return reflect.TypeOf((*[]*Application)(nil)).Elem() 409 } 410 411 func (o ApplicationArrayOutput) ToApplicationArrayOutput() ApplicationArrayOutput { 412 return o 413 } 414 415 func (o ApplicationArrayOutput) ToApplicationArrayOutputWithContext(ctx context.Context) ApplicationArrayOutput { 416 return o 417 } 418 419 func (o ApplicationArrayOutput) Index(i pulumi.IntInput) ApplicationOutput { 420 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Application { 421 return vs[0].([]*Application)[vs[1].(int)] 422 }).(ApplicationOutput) 423 } 424 425 type ApplicationMapOutput struct{ *pulumi.OutputState } 426 427 func (ApplicationMapOutput) ElementType() reflect.Type { 428 return reflect.TypeOf((*map[string]*Application)(nil)).Elem() 429 } 430 431 func (o ApplicationMapOutput) ToApplicationMapOutput() ApplicationMapOutput { 432 return o 433 } 434 435 func (o ApplicationMapOutput) ToApplicationMapOutputWithContext(ctx context.Context) ApplicationMapOutput { 436 return o 437 } 438 439 func (o ApplicationMapOutput) MapIndex(k pulumi.StringInput) ApplicationOutput { 440 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Application { 441 return vs[0].(map[string]*Application)[vs[1].(string)] 442 }).(ApplicationOutput) 443 } 444 445 func init() { 446 pulumi.RegisterInputType(reflect.TypeOf((*ApplicationInput)(nil)).Elem(), &Application{}) 447 pulumi.RegisterInputType(reflect.TypeOf((*ApplicationArrayInput)(nil)).Elem(), ApplicationArray{}) 448 pulumi.RegisterInputType(reflect.TypeOf((*ApplicationMapInput)(nil)).Elem(), ApplicationMap{}) 449 pulumi.RegisterOutputType(ApplicationOutput{}) 450 pulumi.RegisterOutputType(ApplicationArrayOutput{}) 451 pulumi.RegisterOutputType(ApplicationMapOutput{}) 452 }