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