github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/elasticsearch/getDomain.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 elasticsearch 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 // Use this data source to get information about an Elasticsearch Domain 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/elasticsearch" 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 := elasticsearch.LookupDomain(ctx, &elasticsearch.LookupDomainArgs{ 32 // DomainName: "my-domain-name", 33 // }, nil) 34 // if err != nil { 35 // return err 36 // } 37 // return nil 38 // }) 39 // } 40 // 41 // ``` 42 // <!--End PulumiCodeChooser --> 43 func LookupDomain(ctx *pulumi.Context, args *LookupDomainArgs, opts ...pulumi.InvokeOption) (*LookupDomainResult, error) { 44 opts = internal.PkgInvokeDefaultOpts(opts) 45 var rv LookupDomainResult 46 err := ctx.Invoke("aws:elasticsearch/getDomain:getDomain", 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 getDomain. 54 type LookupDomainArgs struct { 55 // Name of the domain. 56 DomainName string `pulumi:"domainName"` 57 // Tags assigned to the domain. 58 Tags map[string]string `pulumi:"tags"` 59 } 60 61 // A collection of values returned by getDomain. 62 type LookupDomainResult struct { 63 // The policy document attached to the domain. 64 AccessPolicies string `pulumi:"accessPolicies"` 65 // Key-value string pairs to specify advanced configuration options. 66 AdvancedOptions map[string]string `pulumi:"advancedOptions"` 67 // Status of the Elasticsearch domain's advanced security options. The block consists of the following attributes: 68 AdvancedSecurityOptions []GetDomainAdvancedSecurityOption `pulumi:"advancedSecurityOptions"` 69 // The ARN of the domain. 70 Arn string `pulumi:"arn"` 71 // Configuration of the Auto-Tune options of the domain. 72 AutoTuneOptions []GetDomainAutoTuneOption `pulumi:"autoTuneOptions"` 73 // Cluster configuration of the domain. 74 ClusterConfigs []GetDomainClusterConfig `pulumi:"clusterConfigs"` 75 // Domain Amazon Cognito Authentication options for Kibana. 76 CognitoOptions []GetDomainCognitoOption `pulumi:"cognitoOptions"` 77 // Status of the creation of the domain. 78 Created bool `pulumi:"created"` 79 // Status of the deletion of the domain. 80 Deleted bool `pulumi:"deleted"` 81 // Unique identifier for the domain. 82 DomainId string `pulumi:"domainId"` 83 DomainName string `pulumi:"domainName"` 84 // EBS Options for the instances in the domain. 85 EbsOptions []GetDomainEbsOption `pulumi:"ebsOptions"` 86 // Elasticsearch version for the domain. 87 ElasticsearchVersion string `pulumi:"elasticsearchVersion"` 88 // Domain encryption at rest related options. 89 EncryptionAtRests []GetDomainEncryptionAtRest `pulumi:"encryptionAtRests"` 90 // Domain-specific endpoint used to submit index, search, and data upload requests. 91 Endpoint string `pulumi:"endpoint"` 92 // The provider-assigned unique ID for this managed resource. 93 Id string `pulumi:"id"` 94 // Domain-specific endpoint used to access the Kibana application. 95 KibanaEndpoint string `pulumi:"kibanaEndpoint"` 96 // Domain log publishing related options. 97 LogPublishingOptions []GetDomainLogPublishingOption `pulumi:"logPublishingOptions"` 98 // Domain in transit encryption related options. 99 NodeToNodeEncryptions []GetDomainNodeToNodeEncryption `pulumi:"nodeToNodeEncryptions"` 100 // Status of a configuration change in the domain. 101 Processing bool `pulumi:"processing"` 102 // Domain snapshot related options. 103 SnapshotOptions []GetDomainSnapshotOption `pulumi:"snapshotOptions"` 104 // Tags assigned to the domain. 105 Tags map[string]string `pulumi:"tags"` 106 // VPC Options for private Elasticsearch domains. 107 VpcOptions []GetDomainVpcOption `pulumi:"vpcOptions"` 108 } 109 110 func LookupDomainOutput(ctx *pulumi.Context, args LookupDomainOutputArgs, opts ...pulumi.InvokeOption) LookupDomainResultOutput { 111 return pulumi.ToOutputWithContext(context.Background(), args). 112 ApplyT(func(v interface{}) (LookupDomainResult, error) { 113 args := v.(LookupDomainArgs) 114 r, err := LookupDomain(ctx, &args, opts...) 115 var s LookupDomainResult 116 if r != nil { 117 s = *r 118 } 119 return s, err 120 }).(LookupDomainResultOutput) 121 } 122 123 // A collection of arguments for invoking getDomain. 124 type LookupDomainOutputArgs struct { 125 // Name of the domain. 126 DomainName pulumi.StringInput `pulumi:"domainName"` 127 // Tags assigned to the domain. 128 Tags pulumi.StringMapInput `pulumi:"tags"` 129 } 130 131 func (LookupDomainOutputArgs) ElementType() reflect.Type { 132 return reflect.TypeOf((*LookupDomainArgs)(nil)).Elem() 133 } 134 135 // A collection of values returned by getDomain. 136 type LookupDomainResultOutput struct{ *pulumi.OutputState } 137 138 func (LookupDomainResultOutput) ElementType() reflect.Type { 139 return reflect.TypeOf((*LookupDomainResult)(nil)).Elem() 140 } 141 142 func (o LookupDomainResultOutput) ToLookupDomainResultOutput() LookupDomainResultOutput { 143 return o 144 } 145 146 func (o LookupDomainResultOutput) ToLookupDomainResultOutputWithContext(ctx context.Context) LookupDomainResultOutput { 147 return o 148 } 149 150 // The policy document attached to the domain. 151 func (o LookupDomainResultOutput) AccessPolicies() pulumi.StringOutput { 152 return o.ApplyT(func(v LookupDomainResult) string { return v.AccessPolicies }).(pulumi.StringOutput) 153 } 154 155 // Key-value string pairs to specify advanced configuration options. 156 func (o LookupDomainResultOutput) AdvancedOptions() pulumi.StringMapOutput { 157 return o.ApplyT(func(v LookupDomainResult) map[string]string { return v.AdvancedOptions }).(pulumi.StringMapOutput) 158 } 159 160 // Status of the Elasticsearch domain's advanced security options. The block consists of the following attributes: 161 func (o LookupDomainResultOutput) AdvancedSecurityOptions() GetDomainAdvancedSecurityOptionArrayOutput { 162 return o.ApplyT(func(v LookupDomainResult) []GetDomainAdvancedSecurityOption { return v.AdvancedSecurityOptions }).(GetDomainAdvancedSecurityOptionArrayOutput) 163 } 164 165 // The ARN of the domain. 166 func (o LookupDomainResultOutput) Arn() pulumi.StringOutput { 167 return o.ApplyT(func(v LookupDomainResult) string { return v.Arn }).(pulumi.StringOutput) 168 } 169 170 // Configuration of the Auto-Tune options of the domain. 171 func (o LookupDomainResultOutput) AutoTuneOptions() GetDomainAutoTuneOptionArrayOutput { 172 return o.ApplyT(func(v LookupDomainResult) []GetDomainAutoTuneOption { return v.AutoTuneOptions }).(GetDomainAutoTuneOptionArrayOutput) 173 } 174 175 // Cluster configuration of the domain. 176 func (o LookupDomainResultOutput) ClusterConfigs() GetDomainClusterConfigArrayOutput { 177 return o.ApplyT(func(v LookupDomainResult) []GetDomainClusterConfig { return v.ClusterConfigs }).(GetDomainClusterConfigArrayOutput) 178 } 179 180 // Domain Amazon Cognito Authentication options for Kibana. 181 func (o LookupDomainResultOutput) CognitoOptions() GetDomainCognitoOptionArrayOutput { 182 return o.ApplyT(func(v LookupDomainResult) []GetDomainCognitoOption { return v.CognitoOptions }).(GetDomainCognitoOptionArrayOutput) 183 } 184 185 // Status of the creation of the domain. 186 func (o LookupDomainResultOutput) Created() pulumi.BoolOutput { 187 return o.ApplyT(func(v LookupDomainResult) bool { return v.Created }).(pulumi.BoolOutput) 188 } 189 190 // Status of the deletion of the domain. 191 func (o LookupDomainResultOutput) Deleted() pulumi.BoolOutput { 192 return o.ApplyT(func(v LookupDomainResult) bool { return v.Deleted }).(pulumi.BoolOutput) 193 } 194 195 // Unique identifier for the domain. 196 func (o LookupDomainResultOutput) DomainId() pulumi.StringOutput { 197 return o.ApplyT(func(v LookupDomainResult) string { return v.DomainId }).(pulumi.StringOutput) 198 } 199 200 func (o LookupDomainResultOutput) DomainName() pulumi.StringOutput { 201 return o.ApplyT(func(v LookupDomainResult) string { return v.DomainName }).(pulumi.StringOutput) 202 } 203 204 // EBS Options for the instances in the domain. 205 func (o LookupDomainResultOutput) EbsOptions() GetDomainEbsOptionArrayOutput { 206 return o.ApplyT(func(v LookupDomainResult) []GetDomainEbsOption { return v.EbsOptions }).(GetDomainEbsOptionArrayOutput) 207 } 208 209 // Elasticsearch version for the domain. 210 func (o LookupDomainResultOutput) ElasticsearchVersion() pulumi.StringOutput { 211 return o.ApplyT(func(v LookupDomainResult) string { return v.ElasticsearchVersion }).(pulumi.StringOutput) 212 } 213 214 // Domain encryption at rest related options. 215 func (o LookupDomainResultOutput) EncryptionAtRests() GetDomainEncryptionAtRestArrayOutput { 216 return o.ApplyT(func(v LookupDomainResult) []GetDomainEncryptionAtRest { return v.EncryptionAtRests }).(GetDomainEncryptionAtRestArrayOutput) 217 } 218 219 // Domain-specific endpoint used to submit index, search, and data upload requests. 220 func (o LookupDomainResultOutput) Endpoint() pulumi.StringOutput { 221 return o.ApplyT(func(v LookupDomainResult) string { return v.Endpoint }).(pulumi.StringOutput) 222 } 223 224 // The provider-assigned unique ID for this managed resource. 225 func (o LookupDomainResultOutput) Id() pulumi.StringOutput { 226 return o.ApplyT(func(v LookupDomainResult) string { return v.Id }).(pulumi.StringOutput) 227 } 228 229 // Domain-specific endpoint used to access the Kibana application. 230 func (o LookupDomainResultOutput) KibanaEndpoint() pulumi.StringOutput { 231 return o.ApplyT(func(v LookupDomainResult) string { return v.KibanaEndpoint }).(pulumi.StringOutput) 232 } 233 234 // Domain log publishing related options. 235 func (o LookupDomainResultOutput) LogPublishingOptions() GetDomainLogPublishingOptionArrayOutput { 236 return o.ApplyT(func(v LookupDomainResult) []GetDomainLogPublishingOption { return v.LogPublishingOptions }).(GetDomainLogPublishingOptionArrayOutput) 237 } 238 239 // Domain in transit encryption related options. 240 func (o LookupDomainResultOutput) NodeToNodeEncryptions() GetDomainNodeToNodeEncryptionArrayOutput { 241 return o.ApplyT(func(v LookupDomainResult) []GetDomainNodeToNodeEncryption { return v.NodeToNodeEncryptions }).(GetDomainNodeToNodeEncryptionArrayOutput) 242 } 243 244 // Status of a configuration change in the domain. 245 func (o LookupDomainResultOutput) Processing() pulumi.BoolOutput { 246 return o.ApplyT(func(v LookupDomainResult) bool { return v.Processing }).(pulumi.BoolOutput) 247 } 248 249 // Domain snapshot related options. 250 func (o LookupDomainResultOutput) SnapshotOptions() GetDomainSnapshotOptionArrayOutput { 251 return o.ApplyT(func(v LookupDomainResult) []GetDomainSnapshotOption { return v.SnapshotOptions }).(GetDomainSnapshotOptionArrayOutput) 252 } 253 254 // Tags assigned to the domain. 255 func (o LookupDomainResultOutput) Tags() pulumi.StringMapOutput { 256 return o.ApplyT(func(v LookupDomainResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) 257 } 258 259 // VPC Options for private Elasticsearch domains. 260 func (o LookupDomainResultOutput) VpcOptions() GetDomainVpcOptionArrayOutput { 261 return o.ApplyT(func(v LookupDomainResult) []GetDomainVpcOption { return v.VpcOptions }).(GetDomainVpcOptionArrayOutput) 262 } 263 264 func init() { 265 pulumi.RegisterOutputType(LookupDomainResultOutput{}) 266 }