github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/location/getMap.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 "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal" 11 "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 12 ) 13 14 // Retrieve information about a Location Service Map. 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/location" 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 := location.LookupMap(ctx, &location.LookupMapArgs{ 32 // MapName: "example", 33 // }, nil) 34 // if err != nil { 35 // return err 36 // } 37 // return nil 38 // }) 39 // } 40 // 41 // ``` 42 // <!--End PulumiCodeChooser --> 43 func LookupMap(ctx *pulumi.Context, args *LookupMapArgs, opts ...pulumi.InvokeOption) (*LookupMapResult, error) { 44 opts = internal.PkgInvokeDefaultOpts(opts) 45 var rv LookupMapResult 46 err := ctx.Invoke("aws:location/getMap:getMap", args, &rv, opts...) 47 if err != nil { 48 return nil, err 49 } 50 return &rv, nil 51 } 52 53 // A collection of arguments for invoking getMap. 54 type LookupMapArgs struct { 55 // Name of the map resource. 56 MapName string `pulumi:"mapName"` 57 // Key-value map of resource tags for the map. 58 Tags map[string]string `pulumi:"tags"` 59 } 60 61 // A collection of values returned by getMap. 62 type LookupMapResult struct { 63 // List of configurations that specify the map tile style selected from a partner data provider. 64 Configurations []GetMapConfiguration `pulumi:"configurations"` 65 // Timestamp for when the map resource was created in ISO 8601 format. 66 CreateTime string `pulumi:"createTime"` 67 // Optional description for the map resource. 68 Description string `pulumi:"description"` 69 // The provider-assigned unique ID for this managed resource. 70 Id string `pulumi:"id"` 71 // ARN for the map resource. 72 MapArn string `pulumi:"mapArn"` 73 MapName string `pulumi:"mapName"` 74 // Key-value map of resource tags for the map. 75 Tags map[string]string `pulumi:"tags"` 76 // Timestamp for when the map resource was last updated in ISO 8601 format. 77 UpdateTime string `pulumi:"updateTime"` 78 } 79 80 func LookupMapOutput(ctx *pulumi.Context, args LookupMapOutputArgs, opts ...pulumi.InvokeOption) LookupMapResultOutput { 81 return pulumi.ToOutputWithContext(context.Background(), args). 82 ApplyT(func(v interface{}) (LookupMapResult, error) { 83 args := v.(LookupMapArgs) 84 r, err := LookupMap(ctx, &args, opts...) 85 var s LookupMapResult 86 if r != nil { 87 s = *r 88 } 89 return s, err 90 }).(LookupMapResultOutput) 91 } 92 93 // A collection of arguments for invoking getMap. 94 type LookupMapOutputArgs struct { 95 // Name of the map resource. 96 MapName pulumi.StringInput `pulumi:"mapName"` 97 // Key-value map of resource tags for the map. 98 Tags pulumi.StringMapInput `pulumi:"tags"` 99 } 100 101 func (LookupMapOutputArgs) ElementType() reflect.Type { 102 return reflect.TypeOf((*LookupMapArgs)(nil)).Elem() 103 } 104 105 // A collection of values returned by getMap. 106 type LookupMapResultOutput struct{ *pulumi.OutputState } 107 108 func (LookupMapResultOutput) ElementType() reflect.Type { 109 return reflect.TypeOf((*LookupMapResult)(nil)).Elem() 110 } 111 112 func (o LookupMapResultOutput) ToLookupMapResultOutput() LookupMapResultOutput { 113 return o 114 } 115 116 func (o LookupMapResultOutput) ToLookupMapResultOutputWithContext(ctx context.Context) LookupMapResultOutput { 117 return o 118 } 119 120 // List of configurations that specify the map tile style selected from a partner data provider. 121 func (o LookupMapResultOutput) Configurations() GetMapConfigurationArrayOutput { 122 return o.ApplyT(func(v LookupMapResult) []GetMapConfiguration { return v.Configurations }).(GetMapConfigurationArrayOutput) 123 } 124 125 // Timestamp for when the map resource was created in ISO 8601 format. 126 func (o LookupMapResultOutput) CreateTime() pulumi.StringOutput { 127 return o.ApplyT(func(v LookupMapResult) string { return v.CreateTime }).(pulumi.StringOutput) 128 } 129 130 // Optional description for the map resource. 131 func (o LookupMapResultOutput) Description() pulumi.StringOutput { 132 return o.ApplyT(func(v LookupMapResult) string { return v.Description }).(pulumi.StringOutput) 133 } 134 135 // The provider-assigned unique ID for this managed resource. 136 func (o LookupMapResultOutput) Id() pulumi.StringOutput { 137 return o.ApplyT(func(v LookupMapResult) string { return v.Id }).(pulumi.StringOutput) 138 } 139 140 // ARN for the map resource. 141 func (o LookupMapResultOutput) MapArn() pulumi.StringOutput { 142 return o.ApplyT(func(v LookupMapResult) string { return v.MapArn }).(pulumi.StringOutput) 143 } 144 145 func (o LookupMapResultOutput) MapName() pulumi.StringOutput { 146 return o.ApplyT(func(v LookupMapResult) string { return v.MapName }).(pulumi.StringOutput) 147 } 148 149 // Key-value map of resource tags for the map. 150 func (o LookupMapResultOutput) Tags() pulumi.StringMapOutput { 151 return o.ApplyT(func(v LookupMapResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) 152 } 153 154 // Timestamp for when the map resource was last updated in ISO 8601 format. 155 func (o LookupMapResultOutput) UpdateTime() pulumi.StringOutput { 156 return o.ApplyT(func(v LookupMapResult) string { return v.UpdateTime }).(pulumi.StringOutput) 157 } 158 159 func init() { 160 pulumi.RegisterOutputType(LookupMapResultOutput{}) 161 }