GetVpcEndpointService

The VPC Endpoint Service data source details about a specific service that can be specified when creating a VPC endpoint within the region configured in the provider.

Example Usage

AWS Service

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var s3 = Output.Create(Aws.Ec2.GetVpcEndpointService.InvokeAsync(new Aws.Ec2.GetVpcEndpointServiceArgs
        {
            Service = "s3",
        }));
        // Create a VPC
        var foo = new Aws.Ec2.Vpc("foo", new Aws.Ec2.VpcArgs
        {
            CidrBlock = "10.0.0.0/16",
        });
        // Create a VPC endpoint
        var ep = new Aws.Ec2.VpcEndpoint("ep", new Aws.Ec2.VpcEndpointArgs
        {
            ServiceName = s3.Apply(s3 => s3.ServiceName),
            VpcId = foo.Id,
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/ec2"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        opt0 := "s3"
        s3, err := ec2.LookupVpcEndpointService(ctx, &ec2.LookupVpcEndpointServiceArgs{
            Service: &opt0,
        }, nil)
        if err != nil {
            return err
        }
        foo, err := ec2.NewVpc(ctx, "foo", &ec2.VpcArgs{
            CidrBlock: pulumi.String("10.0.0.0/16"),
        })
        if err != nil {
            return err
        }
        _, err = ec2.NewVpcEndpoint(ctx, "ep", &ec2.VpcEndpointArgs{
            ServiceName: pulumi.String(s3.ServiceName),
            VpcId:       foo.ID(),
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

s3 = aws.ec2.get_vpc_endpoint_service(service="s3")
# Create a VPC
foo = aws.ec2.Vpc("foo", cidr_block="10.0.0.0/16")
# Create a VPC endpoint
ep = aws.ec2.VpcEndpoint("ep",
    service_name=s3.service_name,
    vpc_id=foo.id)
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

// Declare the data source
const s3 = pulumi.output(aws.ec2.getVpcEndpointService({
    service: "s3",
}, { async: true }));
// Create a VPC
const foo = new aws.ec2.Vpc("foo", {
    cidrBlock: "10.0.0.0/16",
});
// Create a VPC endpoint
const ep = new aws.ec2.VpcEndpoint("ep", {
    serviceName: s3.serviceName!,
    vpcId: foo.id,
});

Non-AWS Service

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var custome = Output.Create(Aws.Ec2.GetVpcEndpointService.InvokeAsync(new Aws.Ec2.GetVpcEndpointServiceArgs
        {
            ServiceName = "com.amazonaws.vpce.us-west-2.vpce-svc-0e87519c997c63cd8",
        }));
    }

}
package main

import (
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/ec2"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        opt0 := "com.amazonaws.vpce.us-west-2.vpce-svc-0e87519c997c63cd8"
        _, err := ec2.LookupVpcEndpointService(ctx, &ec2.LookupVpcEndpointServiceArgs{
            ServiceName: &opt0,
        }, nil)
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

custome = aws.ec2.get_vpc_endpoint_service(service_name="com.amazonaws.vpce.us-west-2.vpce-svc-0e87519c997c63cd8")
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const custome = pulumi.output(aws.ec2.getVpcEndpointService({
    serviceName: "com.amazonaws.vpce.us-west-2.vpce-svc-0e87519c997c63cd8",
}, { async: true }));

Filter

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var test = Output.Create(Aws.Ec2.GetVpcEndpointService.InvokeAsync(new Aws.Ec2.GetVpcEndpointServiceArgs
        {
            Filters = 
            {
                new Aws.Ec2.Inputs.GetVpcEndpointServiceFilterArgs
                {
                    Name = "service-name",
                    Values = 
                    {
                        "some-service",
                    },
                },
            },
        }));
    }

}
package main

import (
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/ec2"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := ec2.LookupVpcEndpointService(ctx, &ec2.LookupVpcEndpointServiceArgs{
            Filters: []ec2.GetVpcEndpointServiceFilter{
                ec2.GetVpcEndpointServiceFilter{
                    Name: "service-name",
                    Values: []string{
                        "some-service",
                    },
                },
            },
        }, nil)
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

test = aws.ec2.get_vpc_endpoint_service(filters=[{
    "name": "service-name",
    "values": ["some-service"],
}])
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const test = pulumi.output(aws.ec2.getVpcEndpointService({
    filters: [{
        name: "service-name",
        values: ["some-service"],
    }],
}, { async: true }));

Using GetVpcEndpointService

function getVpcEndpointService(args: GetVpcEndpointServiceArgs, opts?: InvokeOptions): Promise<GetVpcEndpointServiceResult>
function  get_vpc_endpoint_service(filters=None, service=None, service_name=None, tags=None, opts=None)
func LookupVpcEndpointService(ctx *Context, args *LookupVpcEndpointServiceArgs, opts ...InvokeOption) (*LookupVpcEndpointServiceResult, error)

Note: This function is named LookupVpcEndpointService in the Go SDK.

public static class GetVpcEndpointService {
    public static Task<GetVpcEndpointServiceResult> InvokeAsync(GetVpcEndpointServiceArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Filters List<GetVpcEndpointServiceFilterArgs>

Configuration block(s) for filtering. Detailed below.

Service string

The common name of an AWS service (e.g. s3).

ServiceName string

The service name that is specified when creating a VPC endpoint. For AWS services the service name is usually in the form com.amazonaws.<region>.<service> (the SageMaker Notebook service is an exception to this rule, the service name is in the form aws.sagemaker.<region>.notebook).

Tags Dictionary<string, string>

A map of tags, each pair of which must exactly match a pair on the desired VPC Endpoint Service.

Filters []GetVpcEndpointServiceFilter

Configuration block(s) for filtering. Detailed below.

Service string

The common name of an AWS service (e.g. s3).

ServiceName string

The service name that is specified when creating a VPC endpoint. For AWS services the service name is usually in the form com.amazonaws.<region>.<service> (the SageMaker Notebook service is an exception to this rule, the service name is in the form aws.sagemaker.<region>.notebook).

Tags map[string]string

A map of tags, each pair of which must exactly match a pair on the desired VPC Endpoint Service.

filters GetVpcEndpointServiceFilter[]

Configuration block(s) for filtering. Detailed below.

service string

The common name of an AWS service (e.g. s3).

serviceName string

The service name that is specified when creating a VPC endpoint. For AWS services the service name is usually in the form com.amazonaws.<region>.<service> (the SageMaker Notebook service is an exception to this rule, the service name is in the form aws.sagemaker.<region>.notebook).

tags {[key: string]: string}

A map of tags, each pair of which must exactly match a pair on the desired VPC Endpoint Service.

filters List[GetVpcEndpointServiceFilter]

Configuration block(s) for filtering. Detailed below.

service str

The common name of an AWS service (e.g. s3).

service_name str

The service name that is specified when creating a VPC endpoint. For AWS services the service name is usually in the form com.amazonaws.<region>.<service> (the SageMaker Notebook service is an exception to this rule, the service name is in the form aws.sagemaker.<region>.notebook).

tags Dict[str, str]

A map of tags, each pair of which must exactly match a pair on the desired VPC Endpoint Service.

GetVpcEndpointService Result

The following output properties are available:

AcceptanceRequired bool

Whether or not VPC endpoint connection requests to the service must be accepted by the service owner - true or false.

Arn string

The Amazon Resource Name (ARN) of the VPC endpoint service.

AvailabilityZones List<string>

The Availability Zones in which the service is available.

BaseEndpointDnsNames List<string>

The DNS names for the service.

Id string

The provider-assigned unique ID for this managed resource.

ManagesVpcEndpoints bool

Whether or not the service manages its VPC endpoints - true or false.

Owner string

The AWS account ID of the service owner or amazon.

PrivateDnsName string

The private DNS name for the service.

ServiceId string

The ID of the endpoint service.

ServiceName string
ServiceType string

The service type, Gateway or Interface.

Tags Dictionary<string, string>

A map of tags assigned to the resource.

VpcEndpointPolicySupported bool

Whether or not the service supports endpoint policies - true or false.

Filters List<GetVpcEndpointServiceFilter>
Service string
AcceptanceRequired bool

Whether or not VPC endpoint connection requests to the service must be accepted by the service owner - true or false.

Arn string

The Amazon Resource Name (ARN) of the VPC endpoint service.

AvailabilityZones []string

The Availability Zones in which the service is available.

BaseEndpointDnsNames []string

The DNS names for the service.

Id string

The provider-assigned unique ID for this managed resource.

ManagesVpcEndpoints bool

Whether or not the service manages its VPC endpoints - true or false.

Owner string

The AWS account ID of the service owner or amazon.

PrivateDnsName string

The private DNS name for the service.

ServiceId string

The ID of the endpoint service.

ServiceName string
ServiceType string

The service type, Gateway or Interface.

Tags map[string]string

A map of tags assigned to the resource.

VpcEndpointPolicySupported bool

Whether or not the service supports endpoint policies - true or false.

Filters []GetVpcEndpointServiceFilter
Service string
acceptanceRequired boolean

Whether or not VPC endpoint connection requests to the service must be accepted by the service owner - true or false.

arn string

The Amazon Resource Name (ARN) of the VPC endpoint service.

availabilityZones string[]

The Availability Zones in which the service is available.

baseEndpointDnsNames string[]

The DNS names for the service.

id string

The provider-assigned unique ID for this managed resource.

managesVpcEndpoints boolean

Whether or not the service manages its VPC endpoints - true or false.

owner string

The AWS account ID of the service owner or amazon.

privateDnsName string

The private DNS name for the service.

serviceId string

The ID of the endpoint service.

serviceName string
serviceType string

The service type, Gateway or Interface.

tags {[key: string]: string}

A map of tags assigned to the resource.

vpcEndpointPolicySupported boolean

Whether or not the service supports endpoint policies - true or false.

filters GetVpcEndpointServiceFilter[]
service string
acceptance_required bool

Whether or not VPC endpoint connection requests to the service must be accepted by the service owner - true or false.

arn str

The Amazon Resource Name (ARN) of the VPC endpoint service.

availability_zones List[str]

The Availability Zones in which the service is available.

base_endpoint_dns_names List[str]

The DNS names for the service.

id str

The provider-assigned unique ID for this managed resource.

manages_vpc_endpoints bool

Whether or not the service manages its VPC endpoints - true or false.

owner str

The AWS account ID of the service owner or amazon.

private_dns_name str

The private DNS name for the service.

service_id str

The ID of the endpoint service.

service_name str
service_type str

The service type, Gateway or Interface.

tags Dict[str, str]

A map of tags assigned to the resource.

vpc_endpoint_policy_supported bool

Whether or not the service supports endpoint policies - true or false.

filters List[GetVpcEndpointServiceFilter]
service str

Supporting Types

GetVpcEndpointServiceFilter

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Name string

The name of the filter field. Valid values can be found in the EC2 DescribeVpcEndpointServices API Reference.

Values List<string>

Set of values that are accepted for the given filter field. Results will be selected if any given value matches.

Name string

The name of the filter field. Valid values can be found in the EC2 DescribeVpcEndpointServices API Reference.

Values []string

Set of values that are accepted for the given filter field. Results will be selected if any given value matches.

name string

The name of the filter field. Valid values can be found in the EC2 DescribeVpcEndpointServices API Reference.

values string[]

Set of values that are accepted for the given filter field. Results will be selected if any given value matches.

name str

The name of the filter field. Valid values can be found in the EC2 DescribeVpcEndpointServices API Reference.

values List[str]

Set of values that are accepted for the given filter field. Results will be selected if any given value matches.

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.