github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/vpclattice/getService.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 vpclattice 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 VPC Lattice Service. 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/vpclattice" 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 := vpclattice.LookupService(ctx, &vpclattice.LookupServiceArgs{ 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 LookupService(ctx *pulumi.Context, args *LookupServiceArgs, opts ...pulumi.InvokeOption) (*LookupServiceResult, error) { 46 opts = internal.PkgInvokeDefaultOpts(opts) 47 var rv LookupServiceResult 48 err := ctx.Invoke("aws:vpclattice/getService:getService", 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 getService. 56 type LookupServiceArgs struct { 57 // Service name. 58 Name *string `pulumi:"name"` 59 // ID or Amazon Resource Name (ARN) of the service. 60 ServiceIdentifier *string `pulumi:"serviceIdentifier"` 61 // List of tags associated with the service. 62 Tags map[string]string `pulumi:"tags"` 63 } 64 65 // A collection of values returned by getService. 66 type LookupServiceResult struct { 67 // ARN of the service. 68 Arn string `pulumi:"arn"` 69 // Type of IAM policy. Either `NONE` or `AWS_IAM`. 70 AuthType string `pulumi:"authType"` 71 // Amazon Resource Name (ARN) of the certificate. 72 CertificateArn string `pulumi:"certificateArn"` 73 // Custom domain name of the service. 74 CustomDomainName string `pulumi:"customDomainName"` 75 // DNS name of the service. 76 DnsEntries []GetServiceDnsEntry `pulumi:"dnsEntries"` 77 // The provider-assigned unique ID for this managed resource. 78 Id string `pulumi:"id"` 79 Name string `pulumi:"name"` 80 ServiceIdentifier string `pulumi:"serviceIdentifier"` 81 // Status of the service. 82 Status string `pulumi:"status"` 83 // List of tags associated with the service. 84 Tags map[string]string `pulumi:"tags"` 85 } 86 87 func LookupServiceOutput(ctx *pulumi.Context, args LookupServiceOutputArgs, opts ...pulumi.InvokeOption) LookupServiceResultOutput { 88 return pulumi.ToOutputWithContext(context.Background(), args). 89 ApplyT(func(v interface{}) (LookupServiceResult, error) { 90 args := v.(LookupServiceArgs) 91 r, err := LookupService(ctx, &args, opts...) 92 var s LookupServiceResult 93 if r != nil { 94 s = *r 95 } 96 return s, err 97 }).(LookupServiceResultOutput) 98 } 99 100 // A collection of arguments for invoking getService. 101 type LookupServiceOutputArgs struct { 102 // Service name. 103 Name pulumi.StringPtrInput `pulumi:"name"` 104 // ID or Amazon Resource Name (ARN) of the service. 105 ServiceIdentifier pulumi.StringPtrInput `pulumi:"serviceIdentifier"` 106 // List of tags associated with the service. 107 Tags pulumi.StringMapInput `pulumi:"tags"` 108 } 109 110 func (LookupServiceOutputArgs) ElementType() reflect.Type { 111 return reflect.TypeOf((*LookupServiceArgs)(nil)).Elem() 112 } 113 114 // A collection of values returned by getService. 115 type LookupServiceResultOutput struct{ *pulumi.OutputState } 116 117 func (LookupServiceResultOutput) ElementType() reflect.Type { 118 return reflect.TypeOf((*LookupServiceResult)(nil)).Elem() 119 } 120 121 func (o LookupServiceResultOutput) ToLookupServiceResultOutput() LookupServiceResultOutput { 122 return o 123 } 124 125 func (o LookupServiceResultOutput) ToLookupServiceResultOutputWithContext(ctx context.Context) LookupServiceResultOutput { 126 return o 127 } 128 129 // ARN of the service. 130 func (o LookupServiceResultOutput) Arn() pulumi.StringOutput { 131 return o.ApplyT(func(v LookupServiceResult) string { return v.Arn }).(pulumi.StringOutput) 132 } 133 134 // Type of IAM policy. Either `NONE` or `AWS_IAM`. 135 func (o LookupServiceResultOutput) AuthType() pulumi.StringOutput { 136 return o.ApplyT(func(v LookupServiceResult) string { return v.AuthType }).(pulumi.StringOutput) 137 } 138 139 // Amazon Resource Name (ARN) of the certificate. 140 func (o LookupServiceResultOutput) CertificateArn() pulumi.StringOutput { 141 return o.ApplyT(func(v LookupServiceResult) string { return v.CertificateArn }).(pulumi.StringOutput) 142 } 143 144 // Custom domain name of the service. 145 func (o LookupServiceResultOutput) CustomDomainName() pulumi.StringOutput { 146 return o.ApplyT(func(v LookupServiceResult) string { return v.CustomDomainName }).(pulumi.StringOutput) 147 } 148 149 // DNS name of the service. 150 func (o LookupServiceResultOutput) DnsEntries() GetServiceDnsEntryArrayOutput { 151 return o.ApplyT(func(v LookupServiceResult) []GetServiceDnsEntry { return v.DnsEntries }).(GetServiceDnsEntryArrayOutput) 152 } 153 154 // The provider-assigned unique ID for this managed resource. 155 func (o LookupServiceResultOutput) Id() pulumi.StringOutput { 156 return o.ApplyT(func(v LookupServiceResult) string { return v.Id }).(pulumi.StringOutput) 157 } 158 159 func (o LookupServiceResultOutput) Name() pulumi.StringOutput { 160 return o.ApplyT(func(v LookupServiceResult) string { return v.Name }).(pulumi.StringOutput) 161 } 162 163 func (o LookupServiceResultOutput) ServiceIdentifier() pulumi.StringOutput { 164 return o.ApplyT(func(v LookupServiceResult) string { return v.ServiceIdentifier }).(pulumi.StringOutput) 165 } 166 167 // Status of the service. 168 func (o LookupServiceResultOutput) Status() pulumi.StringOutput { 169 return o.ApplyT(func(v LookupServiceResult) string { return v.Status }).(pulumi.StringOutput) 170 } 171 172 // List of tags associated with the service. 173 func (o LookupServiceResultOutput) Tags() pulumi.StringMapOutput { 174 return o.ApplyT(func(v LookupServiceResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) 175 } 176 177 func init() { 178 pulumi.RegisterOutputType(LookupServiceResultOutput{}) 179 }