github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/appmesh/getVirtualNode.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 appmesh
     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 App Mesh Virtual Node.
    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/appmesh"
    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 := appmesh.LookupVirtualNode(ctx, &appmesh.LookupVirtualNodeArgs{
    32  //				Name:     "serviceBv1",
    33  //				MeshName: "example-mesh",
    34  //			}, nil)
    35  //			if err != nil {
    36  //				return err
    37  //			}
    38  //			return nil
    39  //		})
    40  //	}
    41  //
    42  // ```
    43  // <!--End PulumiCodeChooser -->
    44  func LookupVirtualNode(ctx *pulumi.Context, args *LookupVirtualNodeArgs, opts ...pulumi.InvokeOption) (*LookupVirtualNodeResult, error) {
    45  	opts = internal.PkgInvokeDefaultOpts(opts)
    46  	var rv LookupVirtualNodeResult
    47  	err := ctx.Invoke("aws:appmesh/getVirtualNode:getVirtualNode", args, &rv, opts...)
    48  	if err != nil {
    49  		return nil, err
    50  	}
    51  	return &rv, nil
    52  }
    53  
    54  // A collection of arguments for invoking getVirtualNode.
    55  type LookupVirtualNodeArgs struct {
    56  	// Name of the service mesh in which the virtual node exists.
    57  	MeshName string `pulumi:"meshName"`
    58  	// AWS account ID of the service mesh's owner.
    59  	MeshOwner *string `pulumi:"meshOwner"`
    60  	// Name of the virtual node.
    61  	Name string `pulumi:"name"`
    62  	// Map of tags.
    63  	Tags map[string]string `pulumi:"tags"`
    64  }
    65  
    66  // A collection of values returned by getVirtualNode.
    67  type LookupVirtualNodeResult struct {
    68  	// ARN of the virtual node.
    69  	Arn string `pulumi:"arn"`
    70  	// Creation date of the virtual node.
    71  	CreatedDate string `pulumi:"createdDate"`
    72  	// The provider-assigned unique ID for this managed resource.
    73  	Id string `pulumi:"id"`
    74  	// Last update date of the virtual node.
    75  	LastUpdatedDate string `pulumi:"lastUpdatedDate"`
    76  	MeshName        string `pulumi:"meshName"`
    77  	MeshOwner       string `pulumi:"meshOwner"`
    78  	Name            string `pulumi:"name"`
    79  	// Resource owner's AWS account ID.
    80  	ResourceOwner string `pulumi:"resourceOwner"`
    81  	// Virtual node specification. See the `appmesh.VirtualNode` resource for details.
    82  	Specs []GetVirtualNodeSpec `pulumi:"specs"`
    83  	// Map of tags.
    84  	Tags map[string]string `pulumi:"tags"`
    85  }
    86  
    87  func LookupVirtualNodeOutput(ctx *pulumi.Context, args LookupVirtualNodeOutputArgs, opts ...pulumi.InvokeOption) LookupVirtualNodeResultOutput {
    88  	return pulumi.ToOutputWithContext(context.Background(), args).
    89  		ApplyT(func(v interface{}) (LookupVirtualNodeResult, error) {
    90  			args := v.(LookupVirtualNodeArgs)
    91  			r, err := LookupVirtualNode(ctx, &args, opts...)
    92  			var s LookupVirtualNodeResult
    93  			if r != nil {
    94  				s = *r
    95  			}
    96  			return s, err
    97  		}).(LookupVirtualNodeResultOutput)
    98  }
    99  
   100  // A collection of arguments for invoking getVirtualNode.
   101  type LookupVirtualNodeOutputArgs struct {
   102  	// Name of the service mesh in which the virtual node exists.
   103  	MeshName pulumi.StringInput `pulumi:"meshName"`
   104  	// AWS account ID of the service mesh's owner.
   105  	MeshOwner pulumi.StringPtrInput `pulumi:"meshOwner"`
   106  	// Name of the virtual node.
   107  	Name pulumi.StringInput `pulumi:"name"`
   108  	// Map of tags.
   109  	Tags pulumi.StringMapInput `pulumi:"tags"`
   110  }
   111  
   112  func (LookupVirtualNodeOutputArgs) ElementType() reflect.Type {
   113  	return reflect.TypeOf((*LookupVirtualNodeArgs)(nil)).Elem()
   114  }
   115  
   116  // A collection of values returned by getVirtualNode.
   117  type LookupVirtualNodeResultOutput struct{ *pulumi.OutputState }
   118  
   119  func (LookupVirtualNodeResultOutput) ElementType() reflect.Type {
   120  	return reflect.TypeOf((*LookupVirtualNodeResult)(nil)).Elem()
   121  }
   122  
   123  func (o LookupVirtualNodeResultOutput) ToLookupVirtualNodeResultOutput() LookupVirtualNodeResultOutput {
   124  	return o
   125  }
   126  
   127  func (o LookupVirtualNodeResultOutput) ToLookupVirtualNodeResultOutputWithContext(ctx context.Context) LookupVirtualNodeResultOutput {
   128  	return o
   129  }
   130  
   131  // ARN of the virtual node.
   132  func (o LookupVirtualNodeResultOutput) Arn() pulumi.StringOutput {
   133  	return o.ApplyT(func(v LookupVirtualNodeResult) string { return v.Arn }).(pulumi.StringOutput)
   134  }
   135  
   136  // Creation date of the virtual node.
   137  func (o LookupVirtualNodeResultOutput) CreatedDate() pulumi.StringOutput {
   138  	return o.ApplyT(func(v LookupVirtualNodeResult) string { return v.CreatedDate }).(pulumi.StringOutput)
   139  }
   140  
   141  // The provider-assigned unique ID for this managed resource.
   142  func (o LookupVirtualNodeResultOutput) Id() pulumi.StringOutput {
   143  	return o.ApplyT(func(v LookupVirtualNodeResult) string { return v.Id }).(pulumi.StringOutput)
   144  }
   145  
   146  // Last update date of the virtual node.
   147  func (o LookupVirtualNodeResultOutput) LastUpdatedDate() pulumi.StringOutput {
   148  	return o.ApplyT(func(v LookupVirtualNodeResult) string { return v.LastUpdatedDate }).(pulumi.StringOutput)
   149  }
   150  
   151  func (o LookupVirtualNodeResultOutput) MeshName() pulumi.StringOutput {
   152  	return o.ApplyT(func(v LookupVirtualNodeResult) string { return v.MeshName }).(pulumi.StringOutput)
   153  }
   154  
   155  func (o LookupVirtualNodeResultOutput) MeshOwner() pulumi.StringOutput {
   156  	return o.ApplyT(func(v LookupVirtualNodeResult) string { return v.MeshOwner }).(pulumi.StringOutput)
   157  }
   158  
   159  func (o LookupVirtualNodeResultOutput) Name() pulumi.StringOutput {
   160  	return o.ApplyT(func(v LookupVirtualNodeResult) string { return v.Name }).(pulumi.StringOutput)
   161  }
   162  
   163  // Resource owner's AWS account ID.
   164  func (o LookupVirtualNodeResultOutput) ResourceOwner() pulumi.StringOutput {
   165  	return o.ApplyT(func(v LookupVirtualNodeResult) string { return v.ResourceOwner }).(pulumi.StringOutput)
   166  }
   167  
   168  // Virtual node specification. See the `appmesh.VirtualNode` resource for details.
   169  func (o LookupVirtualNodeResultOutput) Specs() GetVirtualNodeSpecArrayOutput {
   170  	return o.ApplyT(func(v LookupVirtualNodeResult) []GetVirtualNodeSpec { return v.Specs }).(GetVirtualNodeSpecArrayOutput)
   171  }
   172  
   173  // Map of tags.
   174  func (o LookupVirtualNodeResultOutput) Tags() pulumi.StringMapOutput {
   175  	return o.ApplyT(func(v LookupVirtualNodeResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
   176  }
   177  
   178  func init() {
   179  	pulumi.RegisterOutputType(LookupVirtualNodeResultOutput{})
   180  }