github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/opensearch/getServerlessCollection.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 opensearch 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 // Data source for managing an AWS OpenSearch Serverless Collection. 15 // 16 // ## Example Usage 17 // 18 // ### Basic Usage 19 // 20 // <!--Start PulumiCodeChooser --> 21 // ```go 22 // package main 23 // 24 // import ( 25 // 26 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/opensearch" 27 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 28 // 29 // ) 30 // 31 // func main() { 32 // pulumi.Run(func(ctx *pulumi.Context) error { 33 // _, err := opensearch.LookupServerlessCollection(ctx, &opensearch.LookupServerlessCollectionArgs{ 34 // Name: pulumi.StringRef("example"), 35 // }, nil) 36 // if err != nil { 37 // return err 38 // } 39 // return nil 40 // }) 41 // } 42 // 43 // ``` 44 // <!--End PulumiCodeChooser --> 45 func LookupServerlessCollection(ctx *pulumi.Context, args *LookupServerlessCollectionArgs, opts ...pulumi.InvokeOption) (*LookupServerlessCollectionResult, error) { 46 opts = internal.PkgInvokeDefaultOpts(opts) 47 var rv LookupServerlessCollectionResult 48 err := ctx.Invoke("aws:opensearch/getServerlessCollection:getServerlessCollection", args, &rv, opts...) 49 if err != nil { 50 return nil, err 51 } 52 return &rv, nil 53 } 54 55 // A collection of arguments for invoking getServerlessCollection. 56 type LookupServerlessCollectionArgs struct { 57 // ID of the collection. Either `id` or `name` must be provided. 58 Id *string `pulumi:"id"` 59 // Name of the collection. Either `name` or `id` must be provided. 60 Name *string `pulumi:"name"` 61 } 62 63 // A collection of values returned by getServerlessCollection. 64 type LookupServerlessCollectionResult struct { 65 // Amazon Resource Name (ARN) of the collection. 66 Arn string `pulumi:"arn"` 67 // Collection-specific endpoint used to submit index, search, and data upload requests to an OpenSearch Serverless collection. 68 CollectionEndpoint string `pulumi:"collectionEndpoint"` 69 // Date the Collection was created. 70 CreatedDate string `pulumi:"createdDate"` 71 // Collection-specific endpoint used to access OpenSearch Dashboards. 72 DashboardEndpoint string `pulumi:"dashboardEndpoint"` 73 // Description of the collection. 74 Description string `pulumi:"description"` 75 Id string `pulumi:"id"` 76 // The ARN of the Amazon Web Services KMS key used to encrypt the collection. 77 KmsKeyArn string `pulumi:"kmsKeyArn"` 78 // Date the Collection was last modified. 79 LastModifiedDate string `pulumi:"lastModifiedDate"` 80 Name string `pulumi:"name"` 81 // Indicates whether standby replicas should be used for a collection. 82 StandbyReplicas string `pulumi:"standbyReplicas"` 83 // A map of tags to assign to the collection. 84 Tags map[string]string `pulumi:"tags"` 85 // Type of collection. 86 Type string `pulumi:"type"` 87 } 88 89 func LookupServerlessCollectionOutput(ctx *pulumi.Context, args LookupServerlessCollectionOutputArgs, opts ...pulumi.InvokeOption) LookupServerlessCollectionResultOutput { 90 return pulumi.ToOutputWithContext(context.Background(), args). 91 ApplyT(func(v interface{}) (LookupServerlessCollectionResult, error) { 92 args := v.(LookupServerlessCollectionArgs) 93 r, err := LookupServerlessCollection(ctx, &args, opts...) 94 var s LookupServerlessCollectionResult 95 if r != nil { 96 s = *r 97 } 98 return s, err 99 }).(LookupServerlessCollectionResultOutput) 100 } 101 102 // A collection of arguments for invoking getServerlessCollection. 103 type LookupServerlessCollectionOutputArgs struct { 104 // ID of the collection. Either `id` or `name` must be provided. 105 Id pulumi.StringPtrInput `pulumi:"id"` 106 // Name of the collection. Either `name` or `id` must be provided. 107 Name pulumi.StringPtrInput `pulumi:"name"` 108 } 109 110 func (LookupServerlessCollectionOutputArgs) ElementType() reflect.Type { 111 return reflect.TypeOf((*LookupServerlessCollectionArgs)(nil)).Elem() 112 } 113 114 // A collection of values returned by getServerlessCollection. 115 type LookupServerlessCollectionResultOutput struct{ *pulumi.OutputState } 116 117 func (LookupServerlessCollectionResultOutput) ElementType() reflect.Type { 118 return reflect.TypeOf((*LookupServerlessCollectionResult)(nil)).Elem() 119 } 120 121 func (o LookupServerlessCollectionResultOutput) ToLookupServerlessCollectionResultOutput() LookupServerlessCollectionResultOutput { 122 return o 123 } 124 125 func (o LookupServerlessCollectionResultOutput) ToLookupServerlessCollectionResultOutputWithContext(ctx context.Context) LookupServerlessCollectionResultOutput { 126 return o 127 } 128 129 // Amazon Resource Name (ARN) of the collection. 130 func (o LookupServerlessCollectionResultOutput) Arn() pulumi.StringOutput { 131 return o.ApplyT(func(v LookupServerlessCollectionResult) string { return v.Arn }).(pulumi.StringOutput) 132 } 133 134 // Collection-specific endpoint used to submit index, search, and data upload requests to an OpenSearch Serverless collection. 135 func (o LookupServerlessCollectionResultOutput) CollectionEndpoint() pulumi.StringOutput { 136 return o.ApplyT(func(v LookupServerlessCollectionResult) string { return v.CollectionEndpoint }).(pulumi.StringOutput) 137 } 138 139 // Date the Collection was created. 140 func (o LookupServerlessCollectionResultOutput) CreatedDate() pulumi.StringOutput { 141 return o.ApplyT(func(v LookupServerlessCollectionResult) string { return v.CreatedDate }).(pulumi.StringOutput) 142 } 143 144 // Collection-specific endpoint used to access OpenSearch Dashboards. 145 func (o LookupServerlessCollectionResultOutput) DashboardEndpoint() pulumi.StringOutput { 146 return o.ApplyT(func(v LookupServerlessCollectionResult) string { return v.DashboardEndpoint }).(pulumi.StringOutput) 147 } 148 149 // Description of the collection. 150 func (o LookupServerlessCollectionResultOutput) Description() pulumi.StringOutput { 151 return o.ApplyT(func(v LookupServerlessCollectionResult) string { return v.Description }).(pulumi.StringOutput) 152 } 153 154 func (o LookupServerlessCollectionResultOutput) Id() pulumi.StringOutput { 155 return o.ApplyT(func(v LookupServerlessCollectionResult) string { return v.Id }).(pulumi.StringOutput) 156 } 157 158 // The ARN of the Amazon Web Services KMS key used to encrypt the collection. 159 func (o LookupServerlessCollectionResultOutput) KmsKeyArn() pulumi.StringOutput { 160 return o.ApplyT(func(v LookupServerlessCollectionResult) string { return v.KmsKeyArn }).(pulumi.StringOutput) 161 } 162 163 // Date the Collection was last modified. 164 func (o LookupServerlessCollectionResultOutput) LastModifiedDate() pulumi.StringOutput { 165 return o.ApplyT(func(v LookupServerlessCollectionResult) string { return v.LastModifiedDate }).(pulumi.StringOutput) 166 } 167 168 func (o LookupServerlessCollectionResultOutput) Name() pulumi.StringOutput { 169 return o.ApplyT(func(v LookupServerlessCollectionResult) string { return v.Name }).(pulumi.StringOutput) 170 } 171 172 // Indicates whether standby replicas should be used for a collection. 173 func (o LookupServerlessCollectionResultOutput) StandbyReplicas() pulumi.StringOutput { 174 return o.ApplyT(func(v LookupServerlessCollectionResult) string { return v.StandbyReplicas }).(pulumi.StringOutput) 175 } 176 177 // A map of tags to assign to the collection. 178 func (o LookupServerlessCollectionResultOutput) Tags() pulumi.StringMapOutput { 179 return o.ApplyT(func(v LookupServerlessCollectionResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) 180 } 181 182 // Type of collection. 183 func (o LookupServerlessCollectionResultOutput) Type() pulumi.StringOutput { 184 return o.ApplyT(func(v LookupServerlessCollectionResult) string { return v.Type }).(pulumi.StringOutput) 185 } 186 187 func init() { 188 pulumi.RegisterOutputType(LookupServerlessCollectionResultOutput{}) 189 }