github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/location/getPlaceIndex.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 Place Index. 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.LookupPlaceIndex(ctx, &location.LookupPlaceIndexArgs{ 32 // IndexName: "example", 33 // }, nil) 34 // if err != nil { 35 // return err 36 // } 37 // return nil 38 // }) 39 // } 40 // 41 // ``` 42 // <!--End PulumiCodeChooser --> 43 func LookupPlaceIndex(ctx *pulumi.Context, args *LookupPlaceIndexArgs, opts ...pulumi.InvokeOption) (*LookupPlaceIndexResult, error) { 44 opts = internal.PkgInvokeDefaultOpts(opts) 45 var rv LookupPlaceIndexResult 46 err := ctx.Invoke("aws:location/getPlaceIndex:getPlaceIndex", 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 getPlaceIndex. 54 type LookupPlaceIndexArgs struct { 55 // Name of the place index resource. 56 IndexName string `pulumi:"indexName"` 57 // Key-value map of resource tags for the place index. 58 Tags map[string]string `pulumi:"tags"` 59 } 60 61 // A collection of values returned by getPlaceIndex. 62 type LookupPlaceIndexResult struct { 63 // Timestamp for when the place index resource was created in ISO 8601 format. 64 CreateTime string `pulumi:"createTime"` 65 // Data provider of geospatial data. 66 DataSource string `pulumi:"dataSource"` 67 // List of configurations that specify data storage option for requesting Places. 68 DataSourceConfigurations []GetPlaceIndexDataSourceConfiguration `pulumi:"dataSourceConfigurations"` 69 // Optional description for the place index resource. 70 Description string `pulumi:"description"` 71 // The provider-assigned unique ID for this managed resource. 72 Id string `pulumi:"id"` 73 // ARN for the place index resource. 74 IndexArn string `pulumi:"indexArn"` 75 IndexName string `pulumi:"indexName"` 76 // Key-value map of resource tags for the place index. 77 Tags map[string]string `pulumi:"tags"` 78 // Timestamp for when the place index resource was last updated in ISO 8601 format. 79 UpdateTime string `pulumi:"updateTime"` 80 } 81 82 func LookupPlaceIndexOutput(ctx *pulumi.Context, args LookupPlaceIndexOutputArgs, opts ...pulumi.InvokeOption) LookupPlaceIndexResultOutput { 83 return pulumi.ToOutputWithContext(context.Background(), args). 84 ApplyT(func(v interface{}) (LookupPlaceIndexResult, error) { 85 args := v.(LookupPlaceIndexArgs) 86 r, err := LookupPlaceIndex(ctx, &args, opts...) 87 var s LookupPlaceIndexResult 88 if r != nil { 89 s = *r 90 } 91 return s, err 92 }).(LookupPlaceIndexResultOutput) 93 } 94 95 // A collection of arguments for invoking getPlaceIndex. 96 type LookupPlaceIndexOutputArgs struct { 97 // Name of the place index resource. 98 IndexName pulumi.StringInput `pulumi:"indexName"` 99 // Key-value map of resource tags for the place index. 100 Tags pulumi.StringMapInput `pulumi:"tags"` 101 } 102 103 func (LookupPlaceIndexOutputArgs) ElementType() reflect.Type { 104 return reflect.TypeOf((*LookupPlaceIndexArgs)(nil)).Elem() 105 } 106 107 // A collection of values returned by getPlaceIndex. 108 type LookupPlaceIndexResultOutput struct{ *pulumi.OutputState } 109 110 func (LookupPlaceIndexResultOutput) ElementType() reflect.Type { 111 return reflect.TypeOf((*LookupPlaceIndexResult)(nil)).Elem() 112 } 113 114 func (o LookupPlaceIndexResultOutput) ToLookupPlaceIndexResultOutput() LookupPlaceIndexResultOutput { 115 return o 116 } 117 118 func (o LookupPlaceIndexResultOutput) ToLookupPlaceIndexResultOutputWithContext(ctx context.Context) LookupPlaceIndexResultOutput { 119 return o 120 } 121 122 // Timestamp for when the place index resource was created in ISO 8601 format. 123 func (o LookupPlaceIndexResultOutput) CreateTime() pulumi.StringOutput { 124 return o.ApplyT(func(v LookupPlaceIndexResult) string { return v.CreateTime }).(pulumi.StringOutput) 125 } 126 127 // Data provider of geospatial data. 128 func (o LookupPlaceIndexResultOutput) DataSource() pulumi.StringOutput { 129 return o.ApplyT(func(v LookupPlaceIndexResult) string { return v.DataSource }).(pulumi.StringOutput) 130 } 131 132 // List of configurations that specify data storage option for requesting Places. 133 func (o LookupPlaceIndexResultOutput) DataSourceConfigurations() GetPlaceIndexDataSourceConfigurationArrayOutput { 134 return o.ApplyT(func(v LookupPlaceIndexResult) []GetPlaceIndexDataSourceConfiguration { 135 return v.DataSourceConfigurations 136 }).(GetPlaceIndexDataSourceConfigurationArrayOutput) 137 } 138 139 // Optional description for the place index resource. 140 func (o LookupPlaceIndexResultOutput) Description() pulumi.StringOutput { 141 return o.ApplyT(func(v LookupPlaceIndexResult) string { return v.Description }).(pulumi.StringOutput) 142 } 143 144 // The provider-assigned unique ID for this managed resource. 145 func (o LookupPlaceIndexResultOutput) Id() pulumi.StringOutput { 146 return o.ApplyT(func(v LookupPlaceIndexResult) string { return v.Id }).(pulumi.StringOutput) 147 } 148 149 // ARN for the place index resource. 150 func (o LookupPlaceIndexResultOutput) IndexArn() pulumi.StringOutput { 151 return o.ApplyT(func(v LookupPlaceIndexResult) string { return v.IndexArn }).(pulumi.StringOutput) 152 } 153 154 func (o LookupPlaceIndexResultOutput) IndexName() pulumi.StringOutput { 155 return o.ApplyT(func(v LookupPlaceIndexResult) string { return v.IndexName }).(pulumi.StringOutput) 156 } 157 158 // Key-value map of resource tags for the place index. 159 func (o LookupPlaceIndexResultOutput) Tags() pulumi.StringMapOutput { 160 return o.ApplyT(func(v LookupPlaceIndexResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) 161 } 162 163 // Timestamp for when the place index resource was last updated in ISO 8601 format. 164 func (o LookupPlaceIndexResultOutput) UpdateTime() pulumi.StringOutput { 165 return o.ApplyT(func(v LookupPlaceIndexResult) string { return v.UpdateTime }).(pulumi.StringOutput) 166 } 167 168 func init() { 169 pulumi.RegisterOutputType(LookupPlaceIndexResultOutput{}) 170 }