github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/redshiftserverless/getWorkgroup.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 redshiftserverless 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 Redshift Serverless Workgroup. 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/redshiftserverless" 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 := redshiftserverless.LookupWorkgroup(ctx, &redshiftserverless.LookupWorkgroupArgs{ 34 // WorkgroupName: exampleAwsRedshiftserverlessWorkgroup.WorkgroupName, 35 // }, nil) 36 // if err != nil { 37 // return err 38 // } 39 // return nil 40 // }) 41 // } 42 // 43 // ``` 44 // <!--End PulumiCodeChooser --> 45 func LookupWorkgroup(ctx *pulumi.Context, args *LookupWorkgroupArgs, opts ...pulumi.InvokeOption) (*LookupWorkgroupResult, error) { 46 opts = internal.PkgInvokeDefaultOpts(opts) 47 var rv LookupWorkgroupResult 48 err := ctx.Invoke("aws:redshiftserverless/getWorkgroup:getWorkgroup", 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 getWorkgroup. 56 type LookupWorkgroupArgs struct { 57 // The name of the workgroup associated with the database. 58 WorkgroupName string `pulumi:"workgroupName"` 59 } 60 61 // A collection of values returned by getWorkgroup. 62 type LookupWorkgroupResult struct { 63 // Amazon Resource Name (ARN) of the Redshift Serverless Workgroup. 64 Arn string `pulumi:"arn"` 65 // The endpoint that is created from the workgroup. See `Endpoint` below. 66 Endpoints []GetWorkgroupEndpoint `pulumi:"endpoints"` 67 // The value that specifies whether to turn on enhanced virtual private cloud (VPC) routing, which forces Amazon Redshift Serverless to route traffic through your VPC instead of over the internet. 68 EnhancedVpcRouting bool `pulumi:"enhancedVpcRouting"` 69 // The provider-assigned unique ID for this managed resource. 70 Id string `pulumi:"id"` 71 NamespaceName string `pulumi:"namespaceName"` 72 // A value that specifies whether the workgroup can be accessed from a public network. 73 PubliclyAccessible bool `pulumi:"publiclyAccessible"` 74 // An array of security group IDs to associate with the workgroup. 75 SecurityGroupIds []string `pulumi:"securityGroupIds"` 76 // An array of VPC subnet IDs to associate with the workgroup. When set, must contain at least three subnets spanning three Availability Zones. A minimum number of IP addresses is required and scales with the Base Capacity. For more information, see the following [AWS document](https://docs.aws.amazon.com/redshift/latest/mgmt/serverless-known-issues.html). 77 SubnetIds []string `pulumi:"subnetIds"` 78 // The Redshift Workgroup ID. 79 WorkgroupId string `pulumi:"workgroupId"` 80 WorkgroupName string `pulumi:"workgroupName"` 81 } 82 83 func LookupWorkgroupOutput(ctx *pulumi.Context, args LookupWorkgroupOutputArgs, opts ...pulumi.InvokeOption) LookupWorkgroupResultOutput { 84 return pulumi.ToOutputWithContext(context.Background(), args). 85 ApplyT(func(v interface{}) (LookupWorkgroupResult, error) { 86 args := v.(LookupWorkgroupArgs) 87 r, err := LookupWorkgroup(ctx, &args, opts...) 88 var s LookupWorkgroupResult 89 if r != nil { 90 s = *r 91 } 92 return s, err 93 }).(LookupWorkgroupResultOutput) 94 } 95 96 // A collection of arguments for invoking getWorkgroup. 97 type LookupWorkgroupOutputArgs struct { 98 // The name of the workgroup associated with the database. 99 WorkgroupName pulumi.StringInput `pulumi:"workgroupName"` 100 } 101 102 func (LookupWorkgroupOutputArgs) ElementType() reflect.Type { 103 return reflect.TypeOf((*LookupWorkgroupArgs)(nil)).Elem() 104 } 105 106 // A collection of values returned by getWorkgroup. 107 type LookupWorkgroupResultOutput struct{ *pulumi.OutputState } 108 109 func (LookupWorkgroupResultOutput) ElementType() reflect.Type { 110 return reflect.TypeOf((*LookupWorkgroupResult)(nil)).Elem() 111 } 112 113 func (o LookupWorkgroupResultOutput) ToLookupWorkgroupResultOutput() LookupWorkgroupResultOutput { 114 return o 115 } 116 117 func (o LookupWorkgroupResultOutput) ToLookupWorkgroupResultOutputWithContext(ctx context.Context) LookupWorkgroupResultOutput { 118 return o 119 } 120 121 // Amazon Resource Name (ARN) of the Redshift Serverless Workgroup. 122 func (o LookupWorkgroupResultOutput) Arn() pulumi.StringOutput { 123 return o.ApplyT(func(v LookupWorkgroupResult) string { return v.Arn }).(pulumi.StringOutput) 124 } 125 126 // The endpoint that is created from the workgroup. See `Endpoint` below. 127 func (o LookupWorkgroupResultOutput) Endpoints() GetWorkgroupEndpointArrayOutput { 128 return o.ApplyT(func(v LookupWorkgroupResult) []GetWorkgroupEndpoint { return v.Endpoints }).(GetWorkgroupEndpointArrayOutput) 129 } 130 131 // The value that specifies whether to turn on enhanced virtual private cloud (VPC) routing, which forces Amazon Redshift Serverless to route traffic through your VPC instead of over the internet. 132 func (o LookupWorkgroupResultOutput) EnhancedVpcRouting() pulumi.BoolOutput { 133 return o.ApplyT(func(v LookupWorkgroupResult) bool { return v.EnhancedVpcRouting }).(pulumi.BoolOutput) 134 } 135 136 // The provider-assigned unique ID for this managed resource. 137 func (o LookupWorkgroupResultOutput) Id() pulumi.StringOutput { 138 return o.ApplyT(func(v LookupWorkgroupResult) string { return v.Id }).(pulumi.StringOutput) 139 } 140 141 func (o LookupWorkgroupResultOutput) NamespaceName() pulumi.StringOutput { 142 return o.ApplyT(func(v LookupWorkgroupResult) string { return v.NamespaceName }).(pulumi.StringOutput) 143 } 144 145 // A value that specifies whether the workgroup can be accessed from a public network. 146 func (o LookupWorkgroupResultOutput) PubliclyAccessible() pulumi.BoolOutput { 147 return o.ApplyT(func(v LookupWorkgroupResult) bool { return v.PubliclyAccessible }).(pulumi.BoolOutput) 148 } 149 150 // An array of security group IDs to associate with the workgroup. 151 func (o LookupWorkgroupResultOutput) SecurityGroupIds() pulumi.StringArrayOutput { 152 return o.ApplyT(func(v LookupWorkgroupResult) []string { return v.SecurityGroupIds }).(pulumi.StringArrayOutput) 153 } 154 155 // An array of VPC subnet IDs to associate with the workgroup. When set, must contain at least three subnets spanning three Availability Zones. A minimum number of IP addresses is required and scales with the Base Capacity. For more information, see the following [AWS document](https://docs.aws.amazon.com/redshift/latest/mgmt/serverless-known-issues.html). 156 func (o LookupWorkgroupResultOutput) SubnetIds() pulumi.StringArrayOutput { 157 return o.ApplyT(func(v LookupWorkgroupResult) []string { return v.SubnetIds }).(pulumi.StringArrayOutput) 158 } 159 160 // The Redshift Workgroup ID. 161 func (o LookupWorkgroupResultOutput) WorkgroupId() pulumi.StringOutput { 162 return o.ApplyT(func(v LookupWorkgroupResult) string { return v.WorkgroupId }).(pulumi.StringOutput) 163 } 164 165 func (o LookupWorkgroupResultOutput) WorkgroupName() pulumi.StringOutput { 166 return o.ApplyT(func(v LookupWorkgroupResult) string { return v.WorkgroupName }).(pulumi.StringOutput) 167 } 168 169 func init() { 170 pulumi.RegisterOutputType(LookupWorkgroupResultOutput{}) 171 }