github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/location/tracker.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 location 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 // Provides a Location Service Tracker. 16 // 17 // ## Example Usage 18 // 19 // <!--Start PulumiCodeChooser --> 20 // ```go 21 // package main 22 // 23 // import ( 24 // 25 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/location" 26 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 27 // 28 // ) 29 // 30 // func main() { 31 // pulumi.Run(func(ctx *pulumi.Context) error { 32 // _, err := location.NewTracker(ctx, "example", &location.TrackerArgs{ 33 // TrackerName: pulumi.String("example"), 34 // }) 35 // if err != nil { 36 // return err 37 // } 38 // return nil 39 // }) 40 // } 41 // 42 // ``` 43 // <!--End PulumiCodeChooser --> 44 // 45 // ## Import 46 // 47 // Using `pulumi import`, import `aws_location_tracker` resources using the tracker name. For example: 48 // 49 // ```sh 50 // $ pulumi import aws:location/tracker:Tracker example example 51 // ``` 52 type Tracker struct { 53 pulumi.CustomResourceState 54 55 // The timestamp for when the tracker resource was created in ISO 8601 format. 56 CreateTime pulumi.StringOutput `pulumi:"createTime"` 57 // The optional description for the tracker resource. 58 Description pulumi.StringPtrOutput `pulumi:"description"` 59 // A key identifier for an AWS KMS customer managed key assigned to the Amazon Location resource. 60 KmsKeyId pulumi.StringPtrOutput `pulumi:"kmsKeyId"` 61 // The position filtering method of the tracker resource. Valid values: `TimeBased`, `DistanceBased`, `AccuracyBased`. Default: `TimeBased`. 62 PositionFiltering pulumi.StringPtrOutput `pulumi:"positionFiltering"` 63 // Key-value tags for the tracker. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 64 Tags pulumi.StringMapOutput `pulumi:"tags"` 65 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 66 // 67 // Deprecated: Please use `tags` instead. 68 TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"` 69 // The Amazon Resource Name (ARN) for the tracker resource. Used when you need to specify a resource across all AWS. 70 TrackerArn pulumi.StringOutput `pulumi:"trackerArn"` 71 // The name of the tracker resource. 72 // 73 // The following arguments are optional: 74 TrackerName pulumi.StringOutput `pulumi:"trackerName"` 75 // The timestamp for when the tracker resource was last updated in ISO 8601 format. 76 UpdateTime pulumi.StringOutput `pulumi:"updateTime"` 77 } 78 79 // NewTracker registers a new resource with the given unique name, arguments, and options. 80 func NewTracker(ctx *pulumi.Context, 81 name string, args *TrackerArgs, opts ...pulumi.ResourceOption) (*Tracker, error) { 82 if args == nil { 83 return nil, errors.New("missing one or more required arguments") 84 } 85 86 if args.TrackerName == nil { 87 return nil, errors.New("invalid value for required argument 'TrackerName'") 88 } 89 opts = internal.PkgResourceDefaultOpts(opts) 90 var resource Tracker 91 err := ctx.RegisterResource("aws:location/tracker:Tracker", name, args, &resource, opts...) 92 if err != nil { 93 return nil, err 94 } 95 return &resource, nil 96 } 97 98 // GetTracker gets an existing Tracker resource's state with the given name, ID, and optional 99 // state properties that are used to uniquely qualify the lookup (nil if not required). 100 func GetTracker(ctx *pulumi.Context, 101 name string, id pulumi.IDInput, state *TrackerState, opts ...pulumi.ResourceOption) (*Tracker, error) { 102 var resource Tracker 103 err := ctx.ReadResource("aws:location/tracker:Tracker", name, id, state, &resource, opts...) 104 if err != nil { 105 return nil, err 106 } 107 return &resource, nil 108 } 109 110 // Input properties used for looking up and filtering Tracker resources. 111 type trackerState struct { 112 // The timestamp for when the tracker resource was created in ISO 8601 format. 113 CreateTime *string `pulumi:"createTime"` 114 // The optional description for the tracker resource. 115 Description *string `pulumi:"description"` 116 // A key identifier for an AWS KMS customer managed key assigned to the Amazon Location resource. 117 KmsKeyId *string `pulumi:"kmsKeyId"` 118 // The position filtering method of the tracker resource. Valid values: `TimeBased`, `DistanceBased`, `AccuracyBased`. Default: `TimeBased`. 119 PositionFiltering *string `pulumi:"positionFiltering"` 120 // Key-value tags for the tracker. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 121 Tags map[string]string `pulumi:"tags"` 122 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 123 // 124 // Deprecated: Please use `tags` instead. 125 TagsAll map[string]string `pulumi:"tagsAll"` 126 // The Amazon Resource Name (ARN) for the tracker resource. Used when you need to specify a resource across all AWS. 127 TrackerArn *string `pulumi:"trackerArn"` 128 // The name of the tracker resource. 129 // 130 // The following arguments are optional: 131 TrackerName *string `pulumi:"trackerName"` 132 // The timestamp for when the tracker resource was last updated in ISO 8601 format. 133 UpdateTime *string `pulumi:"updateTime"` 134 } 135 136 type TrackerState struct { 137 // The timestamp for when the tracker resource was created in ISO 8601 format. 138 CreateTime pulumi.StringPtrInput 139 // The optional description for the tracker resource. 140 Description pulumi.StringPtrInput 141 // A key identifier for an AWS KMS customer managed key assigned to the Amazon Location resource. 142 KmsKeyId pulumi.StringPtrInput 143 // The position filtering method of the tracker resource. Valid values: `TimeBased`, `DistanceBased`, `AccuracyBased`. Default: `TimeBased`. 144 PositionFiltering pulumi.StringPtrInput 145 // Key-value tags for the tracker. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 146 Tags pulumi.StringMapInput 147 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 148 // 149 // Deprecated: Please use `tags` instead. 150 TagsAll pulumi.StringMapInput 151 // The Amazon Resource Name (ARN) for the tracker resource. Used when you need to specify a resource across all AWS. 152 TrackerArn pulumi.StringPtrInput 153 // The name of the tracker resource. 154 // 155 // The following arguments are optional: 156 TrackerName pulumi.StringPtrInput 157 // The timestamp for when the tracker resource was last updated in ISO 8601 format. 158 UpdateTime pulumi.StringPtrInput 159 } 160 161 func (TrackerState) ElementType() reflect.Type { 162 return reflect.TypeOf((*trackerState)(nil)).Elem() 163 } 164 165 type trackerArgs struct { 166 // The optional description for the tracker resource. 167 Description *string `pulumi:"description"` 168 // A key identifier for an AWS KMS customer managed key assigned to the Amazon Location resource. 169 KmsKeyId *string `pulumi:"kmsKeyId"` 170 // The position filtering method of the tracker resource. Valid values: `TimeBased`, `DistanceBased`, `AccuracyBased`. Default: `TimeBased`. 171 PositionFiltering *string `pulumi:"positionFiltering"` 172 // Key-value tags for the tracker. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 173 Tags map[string]string `pulumi:"tags"` 174 // The name of the tracker resource. 175 // 176 // The following arguments are optional: 177 TrackerName string `pulumi:"trackerName"` 178 } 179 180 // The set of arguments for constructing a Tracker resource. 181 type TrackerArgs struct { 182 // The optional description for the tracker resource. 183 Description pulumi.StringPtrInput 184 // A key identifier for an AWS KMS customer managed key assigned to the Amazon Location resource. 185 KmsKeyId pulumi.StringPtrInput 186 // The position filtering method of the tracker resource. Valid values: `TimeBased`, `DistanceBased`, `AccuracyBased`. Default: `TimeBased`. 187 PositionFiltering pulumi.StringPtrInput 188 // Key-value tags for the tracker. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 189 Tags pulumi.StringMapInput 190 // The name of the tracker resource. 191 // 192 // The following arguments are optional: 193 TrackerName pulumi.StringInput 194 } 195 196 func (TrackerArgs) ElementType() reflect.Type { 197 return reflect.TypeOf((*trackerArgs)(nil)).Elem() 198 } 199 200 type TrackerInput interface { 201 pulumi.Input 202 203 ToTrackerOutput() TrackerOutput 204 ToTrackerOutputWithContext(ctx context.Context) TrackerOutput 205 } 206 207 func (*Tracker) ElementType() reflect.Type { 208 return reflect.TypeOf((**Tracker)(nil)).Elem() 209 } 210 211 func (i *Tracker) ToTrackerOutput() TrackerOutput { 212 return i.ToTrackerOutputWithContext(context.Background()) 213 } 214 215 func (i *Tracker) ToTrackerOutputWithContext(ctx context.Context) TrackerOutput { 216 return pulumi.ToOutputWithContext(ctx, i).(TrackerOutput) 217 } 218 219 // TrackerArrayInput is an input type that accepts TrackerArray and TrackerArrayOutput values. 220 // You can construct a concrete instance of `TrackerArrayInput` via: 221 // 222 // TrackerArray{ TrackerArgs{...} } 223 type TrackerArrayInput interface { 224 pulumi.Input 225 226 ToTrackerArrayOutput() TrackerArrayOutput 227 ToTrackerArrayOutputWithContext(context.Context) TrackerArrayOutput 228 } 229 230 type TrackerArray []TrackerInput 231 232 func (TrackerArray) ElementType() reflect.Type { 233 return reflect.TypeOf((*[]*Tracker)(nil)).Elem() 234 } 235 236 func (i TrackerArray) ToTrackerArrayOutput() TrackerArrayOutput { 237 return i.ToTrackerArrayOutputWithContext(context.Background()) 238 } 239 240 func (i TrackerArray) ToTrackerArrayOutputWithContext(ctx context.Context) TrackerArrayOutput { 241 return pulumi.ToOutputWithContext(ctx, i).(TrackerArrayOutput) 242 } 243 244 // TrackerMapInput is an input type that accepts TrackerMap and TrackerMapOutput values. 245 // You can construct a concrete instance of `TrackerMapInput` via: 246 // 247 // TrackerMap{ "key": TrackerArgs{...} } 248 type TrackerMapInput interface { 249 pulumi.Input 250 251 ToTrackerMapOutput() TrackerMapOutput 252 ToTrackerMapOutputWithContext(context.Context) TrackerMapOutput 253 } 254 255 type TrackerMap map[string]TrackerInput 256 257 func (TrackerMap) ElementType() reflect.Type { 258 return reflect.TypeOf((*map[string]*Tracker)(nil)).Elem() 259 } 260 261 func (i TrackerMap) ToTrackerMapOutput() TrackerMapOutput { 262 return i.ToTrackerMapOutputWithContext(context.Background()) 263 } 264 265 func (i TrackerMap) ToTrackerMapOutputWithContext(ctx context.Context) TrackerMapOutput { 266 return pulumi.ToOutputWithContext(ctx, i).(TrackerMapOutput) 267 } 268 269 type TrackerOutput struct{ *pulumi.OutputState } 270 271 func (TrackerOutput) ElementType() reflect.Type { 272 return reflect.TypeOf((**Tracker)(nil)).Elem() 273 } 274 275 func (o TrackerOutput) ToTrackerOutput() TrackerOutput { 276 return o 277 } 278 279 func (o TrackerOutput) ToTrackerOutputWithContext(ctx context.Context) TrackerOutput { 280 return o 281 } 282 283 // The timestamp for when the tracker resource was created in ISO 8601 format. 284 func (o TrackerOutput) CreateTime() pulumi.StringOutput { 285 return o.ApplyT(func(v *Tracker) pulumi.StringOutput { return v.CreateTime }).(pulumi.StringOutput) 286 } 287 288 // The optional description for the tracker resource. 289 func (o TrackerOutput) Description() pulumi.StringPtrOutput { 290 return o.ApplyT(func(v *Tracker) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) 291 } 292 293 // A key identifier for an AWS KMS customer managed key assigned to the Amazon Location resource. 294 func (o TrackerOutput) KmsKeyId() pulumi.StringPtrOutput { 295 return o.ApplyT(func(v *Tracker) pulumi.StringPtrOutput { return v.KmsKeyId }).(pulumi.StringPtrOutput) 296 } 297 298 // The position filtering method of the tracker resource. Valid values: `TimeBased`, `DistanceBased`, `AccuracyBased`. Default: `TimeBased`. 299 func (o TrackerOutput) PositionFiltering() pulumi.StringPtrOutput { 300 return o.ApplyT(func(v *Tracker) pulumi.StringPtrOutput { return v.PositionFiltering }).(pulumi.StringPtrOutput) 301 } 302 303 // Key-value tags for the tracker. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 304 func (o TrackerOutput) Tags() pulumi.StringMapOutput { 305 return o.ApplyT(func(v *Tracker) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) 306 } 307 308 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 309 // 310 // Deprecated: Please use `tags` instead. 311 func (o TrackerOutput) TagsAll() pulumi.StringMapOutput { 312 return o.ApplyT(func(v *Tracker) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput) 313 } 314 315 // The Amazon Resource Name (ARN) for the tracker resource. Used when you need to specify a resource across all AWS. 316 func (o TrackerOutput) TrackerArn() pulumi.StringOutput { 317 return o.ApplyT(func(v *Tracker) pulumi.StringOutput { return v.TrackerArn }).(pulumi.StringOutput) 318 } 319 320 // The name of the tracker resource. 321 // 322 // The following arguments are optional: 323 func (o TrackerOutput) TrackerName() pulumi.StringOutput { 324 return o.ApplyT(func(v *Tracker) pulumi.StringOutput { return v.TrackerName }).(pulumi.StringOutput) 325 } 326 327 // The timestamp for when the tracker resource was last updated in ISO 8601 format. 328 func (o TrackerOutput) UpdateTime() pulumi.StringOutput { 329 return o.ApplyT(func(v *Tracker) pulumi.StringOutput { return v.UpdateTime }).(pulumi.StringOutput) 330 } 331 332 type TrackerArrayOutput struct{ *pulumi.OutputState } 333 334 func (TrackerArrayOutput) ElementType() reflect.Type { 335 return reflect.TypeOf((*[]*Tracker)(nil)).Elem() 336 } 337 338 func (o TrackerArrayOutput) ToTrackerArrayOutput() TrackerArrayOutput { 339 return o 340 } 341 342 func (o TrackerArrayOutput) ToTrackerArrayOutputWithContext(ctx context.Context) TrackerArrayOutput { 343 return o 344 } 345 346 func (o TrackerArrayOutput) Index(i pulumi.IntInput) TrackerOutput { 347 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Tracker { 348 return vs[0].([]*Tracker)[vs[1].(int)] 349 }).(TrackerOutput) 350 } 351 352 type TrackerMapOutput struct{ *pulumi.OutputState } 353 354 func (TrackerMapOutput) ElementType() reflect.Type { 355 return reflect.TypeOf((*map[string]*Tracker)(nil)).Elem() 356 } 357 358 func (o TrackerMapOutput) ToTrackerMapOutput() TrackerMapOutput { 359 return o 360 } 361 362 func (o TrackerMapOutput) ToTrackerMapOutputWithContext(ctx context.Context) TrackerMapOutput { 363 return o 364 } 365 366 func (o TrackerMapOutput) MapIndex(k pulumi.StringInput) TrackerOutput { 367 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Tracker { 368 return vs[0].(map[string]*Tracker)[vs[1].(string)] 369 }).(TrackerOutput) 370 } 371 372 func init() { 373 pulumi.RegisterInputType(reflect.TypeOf((*TrackerInput)(nil)).Elem(), &Tracker{}) 374 pulumi.RegisterInputType(reflect.TypeOf((*TrackerArrayInput)(nil)).Elem(), TrackerArray{}) 375 pulumi.RegisterInputType(reflect.TypeOf((*TrackerMapInput)(nil)).Elem(), TrackerMap{}) 376 pulumi.RegisterOutputType(TrackerOutput{}) 377 pulumi.RegisterOutputType(TrackerArrayOutput{}) 378 pulumi.RegisterOutputType(TrackerMapOutput{}) 379 }