github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/redshift/getSubnetGroup.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 redshift 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 // Provides details about a specific redshift subnet group. 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/redshift" 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 := redshift.LookupSubnetGroup(ctx, &redshift.LookupSubnetGroupArgs{ 32 // Name: exampleAwsRedshiftSubnetGroup.Name, 33 // }, nil) 34 // if err != nil { 35 // return err 36 // } 37 // return nil 38 // }) 39 // } 40 // 41 // ``` 42 // <!--End PulumiCodeChooser --> 43 func LookupSubnetGroup(ctx *pulumi.Context, args *LookupSubnetGroupArgs, opts ...pulumi.InvokeOption) (*LookupSubnetGroupResult, error) { 44 opts = internal.PkgInvokeDefaultOpts(opts) 45 var rv LookupSubnetGroupResult 46 err := ctx.Invoke("aws:redshift/getSubnetGroup:getSubnetGroup", 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 getSubnetGroup. 54 type LookupSubnetGroupArgs struct { 55 // Name of the cluster subnet group for which information is requested. 56 Name string `pulumi:"name"` 57 // Tags associated to the Subnet Group 58 Tags map[string]string `pulumi:"tags"` 59 } 60 61 // A collection of values returned by getSubnetGroup. 62 type LookupSubnetGroupResult struct { 63 // ARN of the Redshift Subnet Group name. 64 Arn string `pulumi:"arn"` 65 // Description of the Redshift Subnet group. 66 Description string `pulumi:"description"` 67 // The provider-assigned unique ID for this managed resource. 68 Id string `pulumi:"id"` 69 Name string `pulumi:"name"` 70 // An array of VPC subnet IDs. 71 SubnetIds []string `pulumi:"subnetIds"` 72 // Tags associated to the Subnet Group 73 Tags map[string]string `pulumi:"tags"` 74 } 75 76 func LookupSubnetGroupOutput(ctx *pulumi.Context, args LookupSubnetGroupOutputArgs, opts ...pulumi.InvokeOption) LookupSubnetGroupResultOutput { 77 return pulumi.ToOutputWithContext(context.Background(), args). 78 ApplyT(func(v interface{}) (LookupSubnetGroupResult, error) { 79 args := v.(LookupSubnetGroupArgs) 80 r, err := LookupSubnetGroup(ctx, &args, opts...) 81 var s LookupSubnetGroupResult 82 if r != nil { 83 s = *r 84 } 85 return s, err 86 }).(LookupSubnetGroupResultOutput) 87 } 88 89 // A collection of arguments for invoking getSubnetGroup. 90 type LookupSubnetGroupOutputArgs struct { 91 // Name of the cluster subnet group for which information is requested. 92 Name pulumi.StringInput `pulumi:"name"` 93 // Tags associated to the Subnet Group 94 Tags pulumi.StringMapInput `pulumi:"tags"` 95 } 96 97 func (LookupSubnetGroupOutputArgs) ElementType() reflect.Type { 98 return reflect.TypeOf((*LookupSubnetGroupArgs)(nil)).Elem() 99 } 100 101 // A collection of values returned by getSubnetGroup. 102 type LookupSubnetGroupResultOutput struct{ *pulumi.OutputState } 103 104 func (LookupSubnetGroupResultOutput) ElementType() reflect.Type { 105 return reflect.TypeOf((*LookupSubnetGroupResult)(nil)).Elem() 106 } 107 108 func (o LookupSubnetGroupResultOutput) ToLookupSubnetGroupResultOutput() LookupSubnetGroupResultOutput { 109 return o 110 } 111 112 func (o LookupSubnetGroupResultOutput) ToLookupSubnetGroupResultOutputWithContext(ctx context.Context) LookupSubnetGroupResultOutput { 113 return o 114 } 115 116 // ARN of the Redshift Subnet Group name. 117 func (o LookupSubnetGroupResultOutput) Arn() pulumi.StringOutput { 118 return o.ApplyT(func(v LookupSubnetGroupResult) string { return v.Arn }).(pulumi.StringOutput) 119 } 120 121 // Description of the Redshift Subnet group. 122 func (o LookupSubnetGroupResultOutput) Description() pulumi.StringOutput { 123 return o.ApplyT(func(v LookupSubnetGroupResult) string { return v.Description }).(pulumi.StringOutput) 124 } 125 126 // The provider-assigned unique ID for this managed resource. 127 func (o LookupSubnetGroupResultOutput) Id() pulumi.StringOutput { 128 return o.ApplyT(func(v LookupSubnetGroupResult) string { return v.Id }).(pulumi.StringOutput) 129 } 130 131 func (o LookupSubnetGroupResultOutput) Name() pulumi.StringOutput { 132 return o.ApplyT(func(v LookupSubnetGroupResult) string { return v.Name }).(pulumi.StringOutput) 133 } 134 135 // An array of VPC subnet IDs. 136 func (o LookupSubnetGroupResultOutput) SubnetIds() pulumi.StringArrayOutput { 137 return o.ApplyT(func(v LookupSubnetGroupResult) []string { return v.SubnetIds }).(pulumi.StringArrayOutput) 138 } 139 140 // Tags associated to the Subnet Group 141 func (o LookupSubnetGroupResultOutput) Tags() pulumi.StringMapOutput { 142 return o.ApplyT(func(v LookupSubnetGroupResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) 143 } 144 145 func init() { 146 pulumi.RegisterOutputType(LookupSubnetGroupResultOutput{}) 147 }