1. Packages
  2. AWS
  3. API Docs
  4. redshiftserverless
  5. getWorkgroup
AWS v6.77.1 published on Friday, Apr 18, 2025 by Pulumi

aws.redshiftserverless.getWorkgroup

Explore with Pulumi AI

Data source for managing an AWS Redshift Serverless Workgroup.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = aws.redshiftserverless.getWorkgroup({
    workgroupName: exampleAwsRedshiftserverlessWorkgroup.workgroupName,
});
Copy
import pulumi
import pulumi_aws as aws

example = aws.redshiftserverless.get_workgroup(workgroup_name=example_aws_redshiftserverless_workgroup["workgroupName"])
Copy
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/redshiftserverless"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := redshiftserverless.LookupWorkgroup(ctx, &redshiftserverless.LookupWorkgroupArgs{
			WorkgroupName: exampleAwsRedshiftserverlessWorkgroup.WorkgroupName,
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var example = Aws.RedshiftServerless.GetWorkgroup.Invoke(new()
    {
        WorkgroupName = exampleAwsRedshiftserverlessWorkgroup.WorkgroupName,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.redshiftserverless.RedshiftserverlessFunctions;
import com.pulumi.aws.redshiftserverless.inputs.GetWorkgroupArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var example = RedshiftserverlessFunctions.getWorkgroup(GetWorkgroupArgs.builder()
            .workgroupName(exampleAwsRedshiftserverlessWorkgroup.workgroupName())
            .build());

    }
}
Copy
variables:
  example:
    fn::invoke:
      function: aws:redshiftserverless:getWorkgroup
      arguments:
        workgroupName: ${exampleAwsRedshiftserverlessWorkgroup.workgroupName}
Copy

Using getWorkgroup

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getWorkgroup(args: GetWorkgroupArgs, opts?: InvokeOptions): Promise<GetWorkgroupResult>
function getWorkgroupOutput(args: GetWorkgroupOutputArgs, opts?: InvokeOptions): Output<GetWorkgroupResult>
Copy
def get_workgroup(workgroup_name: Optional[str] = None,
                  opts: Optional[InvokeOptions] = None) -> GetWorkgroupResult
def get_workgroup_output(workgroup_name: Optional[pulumi.Input[str]] = None,
                  opts: Optional[InvokeOptions] = None) -> Output[GetWorkgroupResult]
Copy
func LookupWorkgroup(ctx *Context, args *LookupWorkgroupArgs, opts ...InvokeOption) (*LookupWorkgroupResult, error)
func LookupWorkgroupOutput(ctx *Context, args *LookupWorkgroupOutputArgs, opts ...InvokeOption) LookupWorkgroupResultOutput
Copy

> Note: This function is named LookupWorkgroup in the Go SDK.

public static class GetWorkgroup 
{
    public static Task<GetWorkgroupResult> InvokeAsync(GetWorkgroupArgs args, InvokeOptions? opts = null)
    public static Output<GetWorkgroupResult> Invoke(GetWorkgroupInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetWorkgroupResult> getWorkgroup(GetWorkgroupArgs args, InvokeOptions options)
public static Output<GetWorkgroupResult> getWorkgroup(GetWorkgroupArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: aws:redshiftserverless/getWorkgroup:getWorkgroup
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

WorkgroupName This property is required. string
The name of the workgroup associated with the database.
WorkgroupName This property is required. string
The name of the workgroup associated with the database.
workgroupName This property is required. String
The name of the workgroup associated with the database.
workgroupName This property is required. string
The name of the workgroup associated with the database.
workgroup_name This property is required. str
The name of the workgroup associated with the database.
workgroupName This property is required. String
The name of the workgroup associated with the database.

getWorkgroup Result

The following output properties are available:

Arn string
Amazon Resource Name (ARN) of the Redshift Serverless Workgroup.
Endpoints List<GetWorkgroupEndpoint>
The endpoint that is created from the workgroup. See Endpoint below.
EnhancedVpcRouting bool
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.
Id string
The provider-assigned unique ID for this managed resource.
NamespaceName string
PubliclyAccessible bool
A value that specifies whether the workgroup can be accessed from a public network.
SecurityGroupIds List<string>
An array of security group IDs to associate with the workgroup.
SubnetIds List<string>
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.
WorkgroupId string
The Redshift Workgroup ID.
WorkgroupName string
Arn string
Amazon Resource Name (ARN) of the Redshift Serverless Workgroup.
Endpoints []GetWorkgroupEndpoint
The endpoint that is created from the workgroup. See Endpoint below.
EnhancedVpcRouting bool
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.
Id string
The provider-assigned unique ID for this managed resource.
NamespaceName string
PubliclyAccessible bool
A value that specifies whether the workgroup can be accessed from a public network.
SecurityGroupIds []string
An array of security group IDs to associate with the workgroup.
SubnetIds []string
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.
WorkgroupId string
The Redshift Workgroup ID.
WorkgroupName string
arn String
Amazon Resource Name (ARN) of the Redshift Serverless Workgroup.
endpoints List<GetWorkgroupEndpoint>
The endpoint that is created from the workgroup. See Endpoint below.
enhancedVpcRouting Boolean
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.
id String
The provider-assigned unique ID for this managed resource.
namespaceName String
publiclyAccessible Boolean
A value that specifies whether the workgroup can be accessed from a public network.
securityGroupIds List<String>
An array of security group IDs to associate with the workgroup.
subnetIds List<String>
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.
workgroupId String
The Redshift Workgroup ID.
workgroupName String
arn string
Amazon Resource Name (ARN) of the Redshift Serverless Workgroup.
endpoints GetWorkgroupEndpoint[]
The endpoint that is created from the workgroup. See Endpoint below.
enhancedVpcRouting boolean
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.
id string
The provider-assigned unique ID for this managed resource.
namespaceName string
publiclyAccessible boolean
A value that specifies whether the workgroup can be accessed from a public network.
securityGroupIds string[]
An array of security group IDs to associate with the workgroup.
subnetIds string[]
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.
workgroupId string
The Redshift Workgroup ID.
workgroupName string
arn str
Amazon Resource Name (ARN) of the Redshift Serverless Workgroup.
endpoints Sequence[GetWorkgroupEndpoint]
The endpoint that is created from the workgroup. See Endpoint below.
enhanced_vpc_routing bool
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.
id str
The provider-assigned unique ID for this managed resource.
namespace_name str
publicly_accessible bool
A value that specifies whether the workgroup can be accessed from a public network.
security_group_ids Sequence[str]
An array of security group IDs to associate with the workgroup.
subnet_ids Sequence[str]
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.
workgroup_id str
The Redshift Workgroup ID.
workgroup_name str
arn String
Amazon Resource Name (ARN) of the Redshift Serverless Workgroup.
endpoints List<Property Map>
The endpoint that is created from the workgroup. See Endpoint below.
enhancedVpcRouting Boolean
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.
id String
The provider-assigned unique ID for this managed resource.
namespaceName String
publiclyAccessible Boolean
A value that specifies whether the workgroup can be accessed from a public network.
securityGroupIds List<String>
An array of security group IDs to associate with the workgroup.
subnetIds List<String>
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.
workgroupId String
The Redshift Workgroup ID.
workgroupName String

Supporting Types

GetWorkgroupEndpoint

Address This property is required. string
The DNS address of the VPC endpoint.
Port This property is required. int
The port that Amazon Redshift Serverless listens on.
VpcEndpoints This property is required. List<GetWorkgroupEndpointVpcEndpoint>
The VPC endpoint or the Redshift Serverless workgroup. See VPC Endpoint below.
Address This property is required. string
The DNS address of the VPC endpoint.
Port This property is required. int
The port that Amazon Redshift Serverless listens on.
VpcEndpoints This property is required. []GetWorkgroupEndpointVpcEndpoint
The VPC endpoint or the Redshift Serverless workgroup. See VPC Endpoint below.
address This property is required. String
The DNS address of the VPC endpoint.
port This property is required. Integer
The port that Amazon Redshift Serverless listens on.
vpcEndpoints This property is required. List<GetWorkgroupEndpointVpcEndpoint>
The VPC endpoint or the Redshift Serverless workgroup. See VPC Endpoint below.
address This property is required. string
The DNS address of the VPC endpoint.
port This property is required. number
The port that Amazon Redshift Serverless listens on.
vpcEndpoints This property is required. GetWorkgroupEndpointVpcEndpoint[]
The VPC endpoint or the Redshift Serverless workgroup. See VPC Endpoint below.
address This property is required. str
The DNS address of the VPC endpoint.
port This property is required. int
The port that Amazon Redshift Serverless listens on.
vpc_endpoints This property is required. Sequence[GetWorkgroupEndpointVpcEndpoint]
The VPC endpoint or the Redshift Serverless workgroup. See VPC Endpoint below.
address This property is required. String
The DNS address of the VPC endpoint.
port This property is required. Number
The port that Amazon Redshift Serverless listens on.
vpcEndpoints This property is required. List<Property Map>
The VPC endpoint or the Redshift Serverless workgroup. See VPC Endpoint below.

GetWorkgroupEndpointVpcEndpoint

NetworkInterfaces This property is required. List<GetWorkgroupEndpointVpcEndpointNetworkInterface>
The network interfaces of the endpoint.. See Network Interface below.
VpcEndpointId This property is required. string
The DNS address of the VPC endpoint.
VpcId This property is required. string
The port that Amazon Redshift Serverless listens on.
NetworkInterfaces This property is required. []GetWorkgroupEndpointVpcEndpointNetworkInterface
The network interfaces of the endpoint.. See Network Interface below.
VpcEndpointId This property is required. string
The DNS address of the VPC endpoint.
VpcId This property is required. string
The port that Amazon Redshift Serverless listens on.
networkInterfaces This property is required. List<GetWorkgroupEndpointVpcEndpointNetworkInterface>
The network interfaces of the endpoint.. See Network Interface below.
vpcEndpointId This property is required. String
The DNS address of the VPC endpoint.
vpcId This property is required. String
The port that Amazon Redshift Serverless listens on.
networkInterfaces This property is required. GetWorkgroupEndpointVpcEndpointNetworkInterface[]
The network interfaces of the endpoint.. See Network Interface below.
vpcEndpointId This property is required. string
The DNS address of the VPC endpoint.
vpcId This property is required. string
The port that Amazon Redshift Serverless listens on.
network_interfaces This property is required. Sequence[GetWorkgroupEndpointVpcEndpointNetworkInterface]
The network interfaces of the endpoint.. See Network Interface below.
vpc_endpoint_id This property is required. str
The DNS address of the VPC endpoint.
vpc_id This property is required. str
The port that Amazon Redshift Serverless listens on.
networkInterfaces This property is required. List<Property Map>
The network interfaces of the endpoint.. See Network Interface below.
vpcEndpointId This property is required. String
The DNS address of the VPC endpoint.
vpcId This property is required. String
The port that Amazon Redshift Serverless listens on.

GetWorkgroupEndpointVpcEndpointNetworkInterface

AvailabilityZone This property is required. string
The availability Zone.
NetworkInterfaceId This property is required. string
The unique identifier of the network interface.
PrivateIpAddress This property is required. string
The IPv4 address of the network interface within the subnet.
SubnetId This property is required. string
The unique identifier of the subnet.
AvailabilityZone This property is required. string
The availability Zone.
NetworkInterfaceId This property is required. string
The unique identifier of the network interface.
PrivateIpAddress This property is required. string
The IPv4 address of the network interface within the subnet.
SubnetId This property is required. string
The unique identifier of the subnet.
availabilityZone This property is required. String
The availability Zone.
networkInterfaceId This property is required. String
The unique identifier of the network interface.
privateIpAddress This property is required. String
The IPv4 address of the network interface within the subnet.
subnetId This property is required. String
The unique identifier of the subnet.
availabilityZone This property is required. string
The availability Zone.
networkInterfaceId This property is required. string
The unique identifier of the network interface.
privateIpAddress This property is required. string
The IPv4 address of the network interface within the subnet.
subnetId This property is required. string
The unique identifier of the subnet.
availability_zone This property is required. str
The availability Zone.
network_interface_id This property is required. str
The unique identifier of the network interface.
private_ip_address This property is required. str
The IPv4 address of the network interface within the subnet.
subnet_id This property is required. str
The unique identifier of the subnet.
availabilityZone This property is required. String
The availability Zone.
networkInterfaceId This property is required. String
The unique identifier of the network interface.
privateIpAddress This property is required. String
The IPv4 address of the network interface within the subnet.
subnetId This property is required. String
The unique identifier of the subnet.

Package Details

Repository
AWS Classic pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.