github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/pinpoint/app.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 pinpoint 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 Pinpoint App 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/pinpoint" 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 := pinpoint.NewApp(ctx, "example", &pinpoint.AppArgs{ 32 // Name: pulumi.String("test-app"), 33 // Limits: &pinpoint.AppLimitsArgs{ 34 // MaximumDuration: pulumi.Int(600), 35 // }, 36 // QuietTime: &pinpoint.AppQuietTimeArgs{ 37 // Start: pulumi.String("00:00"), 38 // End: pulumi.String("06:00"), 39 // }, 40 // }) 41 // if err != nil { 42 // return err 43 // } 44 // return nil 45 // }) 46 // } 47 // 48 // ``` 49 // <!--End PulumiCodeChooser --> 50 // 51 // ## Import 52 // 53 // Using `pulumi import`, import Pinpoint App using the `application-id`. For example: 54 // 55 // ```sh 56 // $ pulumi import aws:pinpoint/app:App name application-id 57 // ``` 58 type App struct { 59 pulumi.CustomResourceState 60 61 // The Application ID of the Pinpoint App. 62 ApplicationId pulumi.StringOutput `pulumi:"applicationId"` 63 // Amazon Resource Name (ARN) of the PinPoint Application 64 Arn pulumi.StringOutput `pulumi:"arn"` 65 // Specifies settings for invoking an AWS Lambda function that customizes a segment for a campaign 66 CampaignHook AppCampaignHookPtrOutput `pulumi:"campaignHook"` 67 // The default campaign limits for the app. These limits apply to each campaign for the app, unless the campaign overrides the default with limits of its own 68 Limits AppLimitsPtrOutput `pulumi:"limits"` 69 // The application name. By default generated by Pulumi 70 Name pulumi.StringOutput `pulumi:"name"` 71 // The name of the Pinpoint application. Conflicts with `name` 72 NamePrefix pulumi.StringOutput `pulumi:"namePrefix"` 73 // The default quiet time for the app. Each campaign for this app sends no messages during this time unless the campaign overrides the default with a quiet time of its own 74 QuietTime AppQuietTimePtrOutput `pulumi:"quietTime"` 75 // 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. 76 Tags pulumi.StringMapOutput `pulumi:"tags"` 77 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 78 // 79 // Deprecated: Please use `tags` instead. 80 TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"` 81 } 82 83 // NewApp registers a new resource with the given unique name, arguments, and options. 84 func NewApp(ctx *pulumi.Context, 85 name string, args *AppArgs, opts ...pulumi.ResourceOption) (*App, error) { 86 if args == nil { 87 args = &AppArgs{} 88 } 89 90 opts = internal.PkgResourceDefaultOpts(opts) 91 var resource App 92 err := ctx.RegisterResource("aws:pinpoint/app:App", name, args, &resource, opts...) 93 if err != nil { 94 return nil, err 95 } 96 return &resource, nil 97 } 98 99 // GetApp gets an existing App resource's state with the given name, ID, and optional 100 // state properties that are used to uniquely qualify the lookup (nil if not required). 101 func GetApp(ctx *pulumi.Context, 102 name string, id pulumi.IDInput, state *AppState, opts ...pulumi.ResourceOption) (*App, error) { 103 var resource App 104 err := ctx.ReadResource("aws:pinpoint/app:App", name, id, state, &resource, opts...) 105 if err != nil { 106 return nil, err 107 } 108 return &resource, nil 109 } 110 111 // Input properties used for looking up and filtering App resources. 112 type appState struct { 113 // The Application ID of the Pinpoint App. 114 ApplicationId *string `pulumi:"applicationId"` 115 // Amazon Resource Name (ARN) of the PinPoint Application 116 Arn *string `pulumi:"arn"` 117 // Specifies settings for invoking an AWS Lambda function that customizes a segment for a campaign 118 CampaignHook *AppCampaignHook `pulumi:"campaignHook"` 119 // The default campaign limits for the app. These limits apply to each campaign for the app, unless the campaign overrides the default with limits of its own 120 Limits *AppLimits `pulumi:"limits"` 121 // The application name. By default generated by Pulumi 122 Name *string `pulumi:"name"` 123 // The name of the Pinpoint application. Conflicts with `name` 124 NamePrefix *string `pulumi:"namePrefix"` 125 // The default quiet time for the app. Each campaign for this app sends no messages during this time unless the campaign overrides the default with a quiet time of its own 126 QuietTime *AppQuietTime `pulumi:"quietTime"` 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 map[string]string `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 map[string]string `pulumi:"tagsAll"` 133 } 134 135 type AppState struct { 136 // The Application ID of the Pinpoint App. 137 ApplicationId pulumi.StringPtrInput 138 // Amazon Resource Name (ARN) of the PinPoint Application 139 Arn pulumi.StringPtrInput 140 // Specifies settings for invoking an AWS Lambda function that customizes a segment for a campaign 141 CampaignHook AppCampaignHookPtrInput 142 // The default campaign limits for the app. These limits apply to each campaign for the app, unless the campaign overrides the default with limits of its own 143 Limits AppLimitsPtrInput 144 // The application name. By default generated by Pulumi 145 Name pulumi.StringPtrInput 146 // The name of the Pinpoint application. Conflicts with `name` 147 NamePrefix pulumi.StringPtrInput 148 // The default quiet time for the app. Each campaign for this app sends no messages during this time unless the campaign overrides the default with a quiet time of its own 149 QuietTime AppQuietTimePtrInput 150 // 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. 151 Tags pulumi.StringMapInput 152 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 153 // 154 // Deprecated: Please use `tags` instead. 155 TagsAll pulumi.StringMapInput 156 } 157 158 func (AppState) ElementType() reflect.Type { 159 return reflect.TypeOf((*appState)(nil)).Elem() 160 } 161 162 type appArgs struct { 163 // Specifies settings for invoking an AWS Lambda function that customizes a segment for a campaign 164 CampaignHook *AppCampaignHook `pulumi:"campaignHook"` 165 // The default campaign limits for the app. These limits apply to each campaign for the app, unless the campaign overrides the default with limits of its own 166 Limits *AppLimits `pulumi:"limits"` 167 // The application name. By default generated by Pulumi 168 Name *string `pulumi:"name"` 169 // The name of the Pinpoint application. Conflicts with `name` 170 NamePrefix *string `pulumi:"namePrefix"` 171 // The default quiet time for the app. Each campaign for this app sends no messages during this time unless the campaign overrides the default with a quiet time of its own 172 QuietTime *AppQuietTime `pulumi:"quietTime"` 173 // 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. 174 Tags map[string]string `pulumi:"tags"` 175 } 176 177 // The set of arguments for constructing a App resource. 178 type AppArgs struct { 179 // Specifies settings for invoking an AWS Lambda function that customizes a segment for a campaign 180 CampaignHook AppCampaignHookPtrInput 181 // The default campaign limits for the app. These limits apply to each campaign for the app, unless the campaign overrides the default with limits of its own 182 Limits AppLimitsPtrInput 183 // The application name. By default generated by Pulumi 184 Name pulumi.StringPtrInput 185 // The name of the Pinpoint application. Conflicts with `name` 186 NamePrefix pulumi.StringPtrInput 187 // The default quiet time for the app. Each campaign for this app sends no messages during this time unless the campaign overrides the default with a quiet time of its own 188 QuietTime AppQuietTimePtrInput 189 // 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. 190 Tags pulumi.StringMapInput 191 } 192 193 func (AppArgs) ElementType() reflect.Type { 194 return reflect.TypeOf((*appArgs)(nil)).Elem() 195 } 196 197 type AppInput interface { 198 pulumi.Input 199 200 ToAppOutput() AppOutput 201 ToAppOutputWithContext(ctx context.Context) AppOutput 202 } 203 204 func (*App) ElementType() reflect.Type { 205 return reflect.TypeOf((**App)(nil)).Elem() 206 } 207 208 func (i *App) ToAppOutput() AppOutput { 209 return i.ToAppOutputWithContext(context.Background()) 210 } 211 212 func (i *App) ToAppOutputWithContext(ctx context.Context) AppOutput { 213 return pulumi.ToOutputWithContext(ctx, i).(AppOutput) 214 } 215 216 // AppArrayInput is an input type that accepts AppArray and AppArrayOutput values. 217 // You can construct a concrete instance of `AppArrayInput` via: 218 // 219 // AppArray{ AppArgs{...} } 220 type AppArrayInput interface { 221 pulumi.Input 222 223 ToAppArrayOutput() AppArrayOutput 224 ToAppArrayOutputWithContext(context.Context) AppArrayOutput 225 } 226 227 type AppArray []AppInput 228 229 func (AppArray) ElementType() reflect.Type { 230 return reflect.TypeOf((*[]*App)(nil)).Elem() 231 } 232 233 func (i AppArray) ToAppArrayOutput() AppArrayOutput { 234 return i.ToAppArrayOutputWithContext(context.Background()) 235 } 236 237 func (i AppArray) ToAppArrayOutputWithContext(ctx context.Context) AppArrayOutput { 238 return pulumi.ToOutputWithContext(ctx, i).(AppArrayOutput) 239 } 240 241 // AppMapInput is an input type that accepts AppMap and AppMapOutput values. 242 // You can construct a concrete instance of `AppMapInput` via: 243 // 244 // AppMap{ "key": AppArgs{...} } 245 type AppMapInput interface { 246 pulumi.Input 247 248 ToAppMapOutput() AppMapOutput 249 ToAppMapOutputWithContext(context.Context) AppMapOutput 250 } 251 252 type AppMap map[string]AppInput 253 254 func (AppMap) ElementType() reflect.Type { 255 return reflect.TypeOf((*map[string]*App)(nil)).Elem() 256 } 257 258 func (i AppMap) ToAppMapOutput() AppMapOutput { 259 return i.ToAppMapOutputWithContext(context.Background()) 260 } 261 262 func (i AppMap) ToAppMapOutputWithContext(ctx context.Context) AppMapOutput { 263 return pulumi.ToOutputWithContext(ctx, i).(AppMapOutput) 264 } 265 266 type AppOutput struct{ *pulumi.OutputState } 267 268 func (AppOutput) ElementType() reflect.Type { 269 return reflect.TypeOf((**App)(nil)).Elem() 270 } 271 272 func (o AppOutput) ToAppOutput() AppOutput { 273 return o 274 } 275 276 func (o AppOutput) ToAppOutputWithContext(ctx context.Context) AppOutput { 277 return o 278 } 279 280 // The Application ID of the Pinpoint App. 281 func (o AppOutput) ApplicationId() pulumi.StringOutput { 282 return o.ApplyT(func(v *App) pulumi.StringOutput { return v.ApplicationId }).(pulumi.StringOutput) 283 } 284 285 // Amazon Resource Name (ARN) of the PinPoint Application 286 func (o AppOutput) Arn() pulumi.StringOutput { 287 return o.ApplyT(func(v *App) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput) 288 } 289 290 // Specifies settings for invoking an AWS Lambda function that customizes a segment for a campaign 291 func (o AppOutput) CampaignHook() AppCampaignHookPtrOutput { 292 return o.ApplyT(func(v *App) AppCampaignHookPtrOutput { return v.CampaignHook }).(AppCampaignHookPtrOutput) 293 } 294 295 // The default campaign limits for the app. These limits apply to each campaign for the app, unless the campaign overrides the default with limits of its own 296 func (o AppOutput) Limits() AppLimitsPtrOutput { 297 return o.ApplyT(func(v *App) AppLimitsPtrOutput { return v.Limits }).(AppLimitsPtrOutput) 298 } 299 300 // The application name. By default generated by Pulumi 301 func (o AppOutput) Name() pulumi.StringOutput { 302 return o.ApplyT(func(v *App) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) 303 } 304 305 // The name of the Pinpoint application. Conflicts with `name` 306 func (o AppOutput) NamePrefix() pulumi.StringOutput { 307 return o.ApplyT(func(v *App) pulumi.StringOutput { return v.NamePrefix }).(pulumi.StringOutput) 308 } 309 310 // The default quiet time for the app. Each campaign for this app sends no messages during this time unless the campaign overrides the default with a quiet time of its own 311 func (o AppOutput) QuietTime() AppQuietTimePtrOutput { 312 return o.ApplyT(func(v *App) AppQuietTimePtrOutput { return v.QuietTime }).(AppQuietTimePtrOutput) 313 } 314 315 // 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. 316 func (o AppOutput) Tags() pulumi.StringMapOutput { 317 return o.ApplyT(func(v *App) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) 318 } 319 320 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 321 // 322 // Deprecated: Please use `tags` instead. 323 func (o AppOutput) TagsAll() pulumi.StringMapOutput { 324 return o.ApplyT(func(v *App) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput) 325 } 326 327 type AppArrayOutput struct{ *pulumi.OutputState } 328 329 func (AppArrayOutput) ElementType() reflect.Type { 330 return reflect.TypeOf((*[]*App)(nil)).Elem() 331 } 332 333 func (o AppArrayOutput) ToAppArrayOutput() AppArrayOutput { 334 return o 335 } 336 337 func (o AppArrayOutput) ToAppArrayOutputWithContext(ctx context.Context) AppArrayOutput { 338 return o 339 } 340 341 func (o AppArrayOutput) Index(i pulumi.IntInput) AppOutput { 342 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *App { 343 return vs[0].([]*App)[vs[1].(int)] 344 }).(AppOutput) 345 } 346 347 type AppMapOutput struct{ *pulumi.OutputState } 348 349 func (AppMapOutput) ElementType() reflect.Type { 350 return reflect.TypeOf((*map[string]*App)(nil)).Elem() 351 } 352 353 func (o AppMapOutput) ToAppMapOutput() AppMapOutput { 354 return o 355 } 356 357 func (o AppMapOutput) ToAppMapOutputWithContext(ctx context.Context) AppMapOutput { 358 return o 359 } 360 361 func (o AppMapOutput) MapIndex(k pulumi.StringInput) AppOutput { 362 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *App { 363 return vs[0].(map[string]*App)[vs[1].(string)] 364 }).(AppOutput) 365 } 366 367 func init() { 368 pulumi.RegisterInputType(reflect.TypeOf((*AppInput)(nil)).Elem(), &App{}) 369 pulumi.RegisterInputType(reflect.TypeOf((*AppArrayInput)(nil)).Elem(), AppArray{}) 370 pulumi.RegisterInputType(reflect.TypeOf((*AppMapInput)(nil)).Elem(), AppMap{}) 371 pulumi.RegisterOutputType(AppOutput{}) 372 pulumi.RegisterOutputType(AppArrayOutput{}) 373 pulumi.RegisterOutputType(AppMapOutput{}) 374 }