github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/codedeploy/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 codedeploy 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 a CodeDeploy application to be used as a basis for deployments 15 // 16 // ## Example Usage 17 // 18 // ### ECS Application 19 // 20 // <!--Start PulumiCodeChooser --> 21 // ```go 22 // package main 23 // 24 // import ( 25 // 26 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/codedeploy" 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 := codedeploy.NewApplication(ctx, "example", &codedeploy.ApplicationArgs{ 34 // ComputePlatform: pulumi.String("ECS"), 35 // Name: pulumi.String("example"), 36 // }) 37 // if err != nil { 38 // return err 39 // } 40 // return nil 41 // }) 42 // } 43 // 44 // ``` 45 // <!--End PulumiCodeChooser --> 46 // 47 // ### Lambda Application 48 // 49 // <!--Start PulumiCodeChooser --> 50 // ```go 51 // package main 52 // 53 // import ( 54 // 55 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/codedeploy" 56 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 57 // 58 // ) 59 // 60 // func main() { 61 // pulumi.Run(func(ctx *pulumi.Context) error { 62 // _, err := codedeploy.NewApplication(ctx, "example", &codedeploy.ApplicationArgs{ 63 // ComputePlatform: pulumi.String("Lambda"), 64 // Name: pulumi.String("example"), 65 // }) 66 // if err != nil { 67 // return err 68 // } 69 // return nil 70 // }) 71 // } 72 // 73 // ``` 74 // <!--End PulumiCodeChooser --> 75 // 76 // ### Server Application 77 // 78 // <!--Start PulumiCodeChooser --> 79 // ```go 80 // package main 81 // 82 // import ( 83 // 84 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/codedeploy" 85 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 86 // 87 // ) 88 // 89 // func main() { 90 // pulumi.Run(func(ctx *pulumi.Context) error { 91 // _, err := codedeploy.NewApplication(ctx, "example", &codedeploy.ApplicationArgs{ 92 // ComputePlatform: pulumi.String("Server"), 93 // Name: pulumi.String("example"), 94 // }) 95 // if err != nil { 96 // return err 97 // } 98 // return nil 99 // }) 100 // } 101 // 102 // ``` 103 // <!--End PulumiCodeChooser --> 104 // 105 // ## Import 106 // 107 // Using `pulumi import`, import CodeDeploy Applications using the `name`. For example: 108 // 109 // ```sh 110 // $ pulumi import aws:codedeploy/application:Application example my-application 111 // ``` 112 type Application struct { 113 pulumi.CustomResourceState 114 115 // The application ID. 116 ApplicationId pulumi.StringOutput `pulumi:"applicationId"` 117 // The ARN of the CodeDeploy application. 118 Arn pulumi.StringOutput `pulumi:"arn"` 119 // The compute platform can either be `ECS`, `Lambda`, or `Server`. Default is `Server`. 120 ComputePlatform pulumi.StringPtrOutput `pulumi:"computePlatform"` 121 // The name for a connection to a GitHub account. 122 GithubAccountName pulumi.StringOutput `pulumi:"githubAccountName"` 123 // Whether the user has authenticated with GitHub for the specified application. 124 LinkedToGithub pulumi.BoolOutput `pulumi:"linkedToGithub"` 125 // The name of the application. 126 Name pulumi.StringOutput `pulumi:"name"` 127 // Key-value map of resource tags. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 128 Tags pulumi.StringMapOutput `pulumi:"tags"` 129 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 130 // 131 // Deprecated: Please use `tags` instead. 132 TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"` 133 } 134 135 // NewApplication registers a new resource with the given unique name, arguments, and options. 136 func NewApplication(ctx *pulumi.Context, 137 name string, args *ApplicationArgs, opts ...pulumi.ResourceOption) (*Application, error) { 138 if args == nil { 139 args = &ApplicationArgs{} 140 } 141 142 opts = internal.PkgResourceDefaultOpts(opts) 143 var resource Application 144 err := ctx.RegisterResource("aws:codedeploy/application:Application", name, args, &resource, opts...) 145 if err != nil { 146 return nil, err 147 } 148 return &resource, nil 149 } 150 151 // GetApplication gets an existing Application resource's state with the given name, ID, and optional 152 // state properties that are used to uniquely qualify the lookup (nil if not required). 153 func GetApplication(ctx *pulumi.Context, 154 name string, id pulumi.IDInput, state *ApplicationState, opts ...pulumi.ResourceOption) (*Application, error) { 155 var resource Application 156 err := ctx.ReadResource("aws:codedeploy/application:Application", name, id, state, &resource, opts...) 157 if err != nil { 158 return nil, err 159 } 160 return &resource, nil 161 } 162 163 // Input properties used for looking up and filtering Application resources. 164 type applicationState struct { 165 // The application ID. 166 ApplicationId *string `pulumi:"applicationId"` 167 // The ARN of the CodeDeploy application. 168 Arn *string `pulumi:"arn"` 169 // The compute platform can either be `ECS`, `Lambda`, or `Server`. Default is `Server`. 170 ComputePlatform *string `pulumi:"computePlatform"` 171 // The name for a connection to a GitHub account. 172 GithubAccountName *string `pulumi:"githubAccountName"` 173 // Whether the user has authenticated with GitHub for the specified application. 174 LinkedToGithub *bool `pulumi:"linkedToGithub"` 175 // The name of the application. 176 Name *string `pulumi:"name"` 177 // Key-value map of resource tags. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 178 Tags map[string]string `pulumi:"tags"` 179 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 180 // 181 // Deprecated: Please use `tags` instead. 182 TagsAll map[string]string `pulumi:"tagsAll"` 183 } 184 185 type ApplicationState struct { 186 // The application ID. 187 ApplicationId pulumi.StringPtrInput 188 // The ARN of the CodeDeploy application. 189 Arn pulumi.StringPtrInput 190 // The compute platform can either be `ECS`, `Lambda`, or `Server`. Default is `Server`. 191 ComputePlatform pulumi.StringPtrInput 192 // The name for a connection to a GitHub account. 193 GithubAccountName pulumi.StringPtrInput 194 // Whether the user has authenticated with GitHub for the specified application. 195 LinkedToGithub pulumi.BoolPtrInput 196 // The name of the application. 197 Name pulumi.StringPtrInput 198 // Key-value map of resource tags. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 199 Tags pulumi.StringMapInput 200 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 201 // 202 // Deprecated: Please use `tags` instead. 203 TagsAll pulumi.StringMapInput 204 } 205 206 func (ApplicationState) ElementType() reflect.Type { 207 return reflect.TypeOf((*applicationState)(nil)).Elem() 208 } 209 210 type applicationArgs struct { 211 // The compute platform can either be `ECS`, `Lambda`, or `Server`. Default is `Server`. 212 ComputePlatform *string `pulumi:"computePlatform"` 213 // The name of the application. 214 Name *string `pulumi:"name"` 215 // Key-value map of resource tags. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 216 Tags map[string]string `pulumi:"tags"` 217 } 218 219 // The set of arguments for constructing a Application resource. 220 type ApplicationArgs struct { 221 // The compute platform can either be `ECS`, `Lambda`, or `Server`. Default is `Server`. 222 ComputePlatform pulumi.StringPtrInput 223 // The name of the application. 224 Name pulumi.StringPtrInput 225 // Key-value map of resource tags. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 226 Tags pulumi.StringMapInput 227 } 228 229 func (ApplicationArgs) ElementType() reflect.Type { 230 return reflect.TypeOf((*applicationArgs)(nil)).Elem() 231 } 232 233 type ApplicationInput interface { 234 pulumi.Input 235 236 ToApplicationOutput() ApplicationOutput 237 ToApplicationOutputWithContext(ctx context.Context) ApplicationOutput 238 } 239 240 func (*Application) ElementType() reflect.Type { 241 return reflect.TypeOf((**Application)(nil)).Elem() 242 } 243 244 func (i *Application) ToApplicationOutput() ApplicationOutput { 245 return i.ToApplicationOutputWithContext(context.Background()) 246 } 247 248 func (i *Application) ToApplicationOutputWithContext(ctx context.Context) ApplicationOutput { 249 return pulumi.ToOutputWithContext(ctx, i).(ApplicationOutput) 250 } 251 252 // ApplicationArrayInput is an input type that accepts ApplicationArray and ApplicationArrayOutput values. 253 // You can construct a concrete instance of `ApplicationArrayInput` via: 254 // 255 // ApplicationArray{ ApplicationArgs{...} } 256 type ApplicationArrayInput interface { 257 pulumi.Input 258 259 ToApplicationArrayOutput() ApplicationArrayOutput 260 ToApplicationArrayOutputWithContext(context.Context) ApplicationArrayOutput 261 } 262 263 type ApplicationArray []ApplicationInput 264 265 func (ApplicationArray) ElementType() reflect.Type { 266 return reflect.TypeOf((*[]*Application)(nil)).Elem() 267 } 268 269 func (i ApplicationArray) ToApplicationArrayOutput() ApplicationArrayOutput { 270 return i.ToApplicationArrayOutputWithContext(context.Background()) 271 } 272 273 func (i ApplicationArray) ToApplicationArrayOutputWithContext(ctx context.Context) ApplicationArrayOutput { 274 return pulumi.ToOutputWithContext(ctx, i).(ApplicationArrayOutput) 275 } 276 277 // ApplicationMapInput is an input type that accepts ApplicationMap and ApplicationMapOutput values. 278 // You can construct a concrete instance of `ApplicationMapInput` via: 279 // 280 // ApplicationMap{ "key": ApplicationArgs{...} } 281 type ApplicationMapInput interface { 282 pulumi.Input 283 284 ToApplicationMapOutput() ApplicationMapOutput 285 ToApplicationMapOutputWithContext(context.Context) ApplicationMapOutput 286 } 287 288 type ApplicationMap map[string]ApplicationInput 289 290 func (ApplicationMap) ElementType() reflect.Type { 291 return reflect.TypeOf((*map[string]*Application)(nil)).Elem() 292 } 293 294 func (i ApplicationMap) ToApplicationMapOutput() ApplicationMapOutput { 295 return i.ToApplicationMapOutputWithContext(context.Background()) 296 } 297 298 func (i ApplicationMap) ToApplicationMapOutputWithContext(ctx context.Context) ApplicationMapOutput { 299 return pulumi.ToOutputWithContext(ctx, i).(ApplicationMapOutput) 300 } 301 302 type ApplicationOutput struct{ *pulumi.OutputState } 303 304 func (ApplicationOutput) ElementType() reflect.Type { 305 return reflect.TypeOf((**Application)(nil)).Elem() 306 } 307 308 func (o ApplicationOutput) ToApplicationOutput() ApplicationOutput { 309 return o 310 } 311 312 func (o ApplicationOutput) ToApplicationOutputWithContext(ctx context.Context) ApplicationOutput { 313 return o 314 } 315 316 // The application ID. 317 func (o ApplicationOutput) ApplicationId() pulumi.StringOutput { 318 return o.ApplyT(func(v *Application) pulumi.StringOutput { return v.ApplicationId }).(pulumi.StringOutput) 319 } 320 321 // The ARN of the CodeDeploy application. 322 func (o ApplicationOutput) Arn() pulumi.StringOutput { 323 return o.ApplyT(func(v *Application) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput) 324 } 325 326 // The compute platform can either be `ECS`, `Lambda`, or `Server`. Default is `Server`. 327 func (o ApplicationOutput) ComputePlatform() pulumi.StringPtrOutput { 328 return o.ApplyT(func(v *Application) pulumi.StringPtrOutput { return v.ComputePlatform }).(pulumi.StringPtrOutput) 329 } 330 331 // The name for a connection to a GitHub account. 332 func (o ApplicationOutput) GithubAccountName() pulumi.StringOutput { 333 return o.ApplyT(func(v *Application) pulumi.StringOutput { return v.GithubAccountName }).(pulumi.StringOutput) 334 } 335 336 // Whether the user has authenticated with GitHub for the specified application. 337 func (o ApplicationOutput) LinkedToGithub() pulumi.BoolOutput { 338 return o.ApplyT(func(v *Application) pulumi.BoolOutput { return v.LinkedToGithub }).(pulumi.BoolOutput) 339 } 340 341 // The name of the application. 342 func (o ApplicationOutput) Name() pulumi.StringOutput { 343 return o.ApplyT(func(v *Application) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) 344 } 345 346 // Key-value map of resource tags. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 347 func (o ApplicationOutput) Tags() pulumi.StringMapOutput { 348 return o.ApplyT(func(v *Application) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) 349 } 350 351 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 352 // 353 // Deprecated: Please use `tags` instead. 354 func (o ApplicationOutput) TagsAll() pulumi.StringMapOutput { 355 return o.ApplyT(func(v *Application) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput) 356 } 357 358 type ApplicationArrayOutput struct{ *pulumi.OutputState } 359 360 func (ApplicationArrayOutput) ElementType() reflect.Type { 361 return reflect.TypeOf((*[]*Application)(nil)).Elem() 362 } 363 364 func (o ApplicationArrayOutput) ToApplicationArrayOutput() ApplicationArrayOutput { 365 return o 366 } 367 368 func (o ApplicationArrayOutput) ToApplicationArrayOutputWithContext(ctx context.Context) ApplicationArrayOutput { 369 return o 370 } 371 372 func (o ApplicationArrayOutput) Index(i pulumi.IntInput) ApplicationOutput { 373 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Application { 374 return vs[0].([]*Application)[vs[1].(int)] 375 }).(ApplicationOutput) 376 } 377 378 type ApplicationMapOutput struct{ *pulumi.OutputState } 379 380 func (ApplicationMapOutput) ElementType() reflect.Type { 381 return reflect.TypeOf((*map[string]*Application)(nil)).Elem() 382 } 383 384 func (o ApplicationMapOutput) ToApplicationMapOutput() ApplicationMapOutput { 385 return o 386 } 387 388 func (o ApplicationMapOutput) ToApplicationMapOutputWithContext(ctx context.Context) ApplicationMapOutput { 389 return o 390 } 391 392 func (o ApplicationMapOutput) MapIndex(k pulumi.StringInput) ApplicationOutput { 393 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Application { 394 return vs[0].(map[string]*Application)[vs[1].(string)] 395 }).(ApplicationOutput) 396 } 397 398 func init() { 399 pulumi.RegisterInputType(reflect.TypeOf((*ApplicationInput)(nil)).Elem(), &Application{}) 400 pulumi.RegisterInputType(reflect.TypeOf((*ApplicationArrayInput)(nil)).Elem(), ApplicationArray{}) 401 pulumi.RegisterInputType(reflect.TypeOf((*ApplicationMapInput)(nil)).Elem(), ApplicationMap{}) 402 pulumi.RegisterOutputType(ApplicationOutput{}) 403 pulumi.RegisterOutputType(ApplicationArrayOutput{}) 404 pulumi.RegisterOutputType(ApplicationMapOutput{}) 405 }