github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/msk/getVpcConnection.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 msk
     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  // Get information on an Amazon MSK VPC Connection.
    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/msk"
    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 := msk.LookupVpcConnection(ctx, &msk.LookupVpcConnectionArgs{
    32  //				Arn: exampleAwsMskVpcConnection.Arn,
    33  //			}, nil)
    34  //			if err != nil {
    35  //				return err
    36  //			}
    37  //			return nil
    38  //		})
    39  //	}
    40  //
    41  // ```
    42  // <!--End PulumiCodeChooser -->
    43  func LookupVpcConnection(ctx *pulumi.Context, args *LookupVpcConnectionArgs, opts ...pulumi.InvokeOption) (*LookupVpcConnectionResult, error) {
    44  	opts = internal.PkgInvokeDefaultOpts(opts)
    45  	var rv LookupVpcConnectionResult
    46  	err := ctx.Invoke("aws:msk/getVpcConnection:getVpcConnection", 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 getVpcConnection.
    54  type LookupVpcConnectionArgs struct {
    55  	// ARN of the VPC Connection.
    56  	Arn string `pulumi:"arn"`
    57  	// Map of key-value pairs assigned to the VPC Connection.
    58  	Tags map[string]string `pulumi:"tags"`
    59  }
    60  
    61  // A collection of values returned by getVpcConnection.
    62  type LookupVpcConnectionResult struct {
    63  	Arn string `pulumi:"arn"`
    64  	// The authentication type for the client VPC Connection.
    65  	Authentication string `pulumi:"authentication"`
    66  	// The list of subnets in the client VPC.
    67  	ClientSubnets []string `pulumi:"clientSubnets"`
    68  	// The provider-assigned unique ID for this managed resource.
    69  	Id string `pulumi:"id"`
    70  	// The security groups attached to the ENIs for the broker nodes.
    71  	SecurityGroups []string `pulumi:"securityGroups"`
    72  	// Map of key-value pairs assigned to the VPC Connection.
    73  	Tags map[string]string `pulumi:"tags"`
    74  	// The Amazon Resource Name (ARN) of the cluster.
    75  	TargetClusterArn string `pulumi:"targetClusterArn"`
    76  	// The VPC ID of the remote client.
    77  	VpcId string `pulumi:"vpcId"`
    78  }
    79  
    80  func LookupVpcConnectionOutput(ctx *pulumi.Context, args LookupVpcConnectionOutputArgs, opts ...pulumi.InvokeOption) LookupVpcConnectionResultOutput {
    81  	return pulumi.ToOutputWithContext(context.Background(), args).
    82  		ApplyT(func(v interface{}) (LookupVpcConnectionResult, error) {
    83  			args := v.(LookupVpcConnectionArgs)
    84  			r, err := LookupVpcConnection(ctx, &args, opts...)
    85  			var s LookupVpcConnectionResult
    86  			if r != nil {
    87  				s = *r
    88  			}
    89  			return s, err
    90  		}).(LookupVpcConnectionResultOutput)
    91  }
    92  
    93  // A collection of arguments for invoking getVpcConnection.
    94  type LookupVpcConnectionOutputArgs struct {
    95  	// ARN of the VPC Connection.
    96  	Arn pulumi.StringInput `pulumi:"arn"`
    97  	// Map of key-value pairs assigned to the VPC Connection.
    98  	Tags pulumi.StringMapInput `pulumi:"tags"`
    99  }
   100  
   101  func (LookupVpcConnectionOutputArgs) ElementType() reflect.Type {
   102  	return reflect.TypeOf((*LookupVpcConnectionArgs)(nil)).Elem()
   103  }
   104  
   105  // A collection of values returned by getVpcConnection.
   106  type LookupVpcConnectionResultOutput struct{ *pulumi.OutputState }
   107  
   108  func (LookupVpcConnectionResultOutput) ElementType() reflect.Type {
   109  	return reflect.TypeOf((*LookupVpcConnectionResult)(nil)).Elem()
   110  }
   111  
   112  func (o LookupVpcConnectionResultOutput) ToLookupVpcConnectionResultOutput() LookupVpcConnectionResultOutput {
   113  	return o
   114  }
   115  
   116  func (o LookupVpcConnectionResultOutput) ToLookupVpcConnectionResultOutputWithContext(ctx context.Context) LookupVpcConnectionResultOutput {
   117  	return o
   118  }
   119  
   120  func (o LookupVpcConnectionResultOutput) Arn() pulumi.StringOutput {
   121  	return o.ApplyT(func(v LookupVpcConnectionResult) string { return v.Arn }).(pulumi.StringOutput)
   122  }
   123  
   124  // The authentication type for the client VPC Connection.
   125  func (o LookupVpcConnectionResultOutput) Authentication() pulumi.StringOutput {
   126  	return o.ApplyT(func(v LookupVpcConnectionResult) string { return v.Authentication }).(pulumi.StringOutput)
   127  }
   128  
   129  // The list of subnets in the client VPC.
   130  func (o LookupVpcConnectionResultOutput) ClientSubnets() pulumi.StringArrayOutput {
   131  	return o.ApplyT(func(v LookupVpcConnectionResult) []string { return v.ClientSubnets }).(pulumi.StringArrayOutput)
   132  }
   133  
   134  // The provider-assigned unique ID for this managed resource.
   135  func (o LookupVpcConnectionResultOutput) Id() pulumi.StringOutput {
   136  	return o.ApplyT(func(v LookupVpcConnectionResult) string { return v.Id }).(pulumi.StringOutput)
   137  }
   138  
   139  // The security groups attached to the ENIs for the broker nodes.
   140  func (o LookupVpcConnectionResultOutput) SecurityGroups() pulumi.StringArrayOutput {
   141  	return o.ApplyT(func(v LookupVpcConnectionResult) []string { return v.SecurityGroups }).(pulumi.StringArrayOutput)
   142  }
   143  
   144  // Map of key-value pairs assigned to the VPC Connection.
   145  func (o LookupVpcConnectionResultOutput) Tags() pulumi.StringMapOutput {
   146  	return o.ApplyT(func(v LookupVpcConnectionResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
   147  }
   148  
   149  // The Amazon Resource Name (ARN) of the cluster.
   150  func (o LookupVpcConnectionResultOutput) TargetClusterArn() pulumi.StringOutput {
   151  	return o.ApplyT(func(v LookupVpcConnectionResult) string { return v.TargetClusterArn }).(pulumi.StringOutput)
   152  }
   153  
   154  // The VPC ID of the remote client.
   155  func (o LookupVpcConnectionResultOutput) VpcId() pulumi.StringOutput {
   156  	return o.ApplyT(func(v LookupVpcConnectionResult) string { return v.VpcId }).(pulumi.StringOutput)
   157  }
   158  
   159  func init() {
   160  	pulumi.RegisterOutputType(LookupVpcConnectionResultOutput{})
   161  }