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