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
LookupVpcEndpointServicein the Go SDK.
public static class GetVpcEndpointService {
public static Task<GetVpcEndpointServiceResult> InvokeAsync(GetVpcEndpointServiceArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
- Filters
List<Get
Vpc Endpoint Service Filter Args> Configuration block(s) for filtering. Detailed below.
- Service string
The common name of an AWS service (e.g.
s3).- Service
Name 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 formaws.sagemaker.<region>.notebook).- Dictionary<string, string>
A map of tags, each pair of which must exactly match a pair on the desired VPC Endpoint Service.
- Filters
[]Get
Vpc Endpoint Service Filter Configuration block(s) for filtering. Detailed below.
- Service string
The common name of an AWS service (e.g.
s3).- Service
Name 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 formaws.sagemaker.<region>.notebook).- map[string]string
A map of tags, each pair of which must exactly match a pair on the desired VPC Endpoint Service.
- filters
Get
Vpc Endpoint Service Filter[] Configuration block(s) for filtering. Detailed below.
- service string
The common name of an AWS service (e.g.
s3).- service
Name 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 formaws.sagemaker.<region>.notebook).- {[key: string]: string}
A map of tags, each pair of which must exactly match a pair on the desired VPC Endpoint Service.
- filters
List[Get
Vpc Endpoint Service Filter] 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 formaws.sagemaker.<region>.notebook).- 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:
- Acceptance
Required bool Whether or not VPC endpoint connection requests to the service must be accepted by the service owner -
trueorfalse.- Arn string
The Amazon Resource Name (ARN) of the VPC endpoint service.
- Availability
Zones List<string> The Availability Zones in which the service is available.
- Base
Endpoint List<string>Dns Names The DNS names for the service.
- Id string
The provider-assigned unique ID for this managed resource.
- Manages
Vpc boolEndpoints Whether or not the service manages its VPC endpoints -
trueorfalse.- Owner string
The AWS account ID of the service owner or
amazon.- Private
Dns stringName The private DNS name for the service.
- Service
Id string The ID of the endpoint service.
- Service
Name string - Service
Type string The service type,
GatewayorInterface.- Dictionary<string, string>
A map of tags assigned to the resource.
- Vpc
Endpoint boolPolicy Supported Whether or not the service supports endpoint policies -
trueorfalse.- Filters
List<Get
Vpc Endpoint Service Filter> - Service string
- Acceptance
Required bool Whether or not VPC endpoint connection requests to the service must be accepted by the service owner -
trueorfalse.- Arn string
The Amazon Resource Name (ARN) of the VPC endpoint service.
- Availability
Zones []string The Availability Zones in which the service is available.
- Base
Endpoint []stringDns Names The DNS names for the service.
- Id string
The provider-assigned unique ID for this managed resource.
- Manages
Vpc boolEndpoints Whether or not the service manages its VPC endpoints -
trueorfalse.- Owner string
The AWS account ID of the service owner or
amazon.- Private
Dns stringName The private DNS name for the service.
- Service
Id string The ID of the endpoint service.
- Service
Name string - Service
Type string The service type,
GatewayorInterface.- map[string]string
A map of tags assigned to the resource.
- Vpc
Endpoint boolPolicy Supported Whether or not the service supports endpoint policies -
trueorfalse.- Filters
[]Get
Vpc Endpoint Service Filter - Service string
- acceptance
Required boolean Whether or not VPC endpoint connection requests to the service must be accepted by the service owner -
trueorfalse.- arn string
The Amazon Resource Name (ARN) of the VPC endpoint service.
- availability
Zones string[] The Availability Zones in which the service is available.
- base
Endpoint string[]Dns Names The DNS names for the service.
- id string
The provider-assigned unique ID for this managed resource.
- manages
Vpc booleanEndpoints Whether or not the service manages its VPC endpoints -
trueorfalse.- owner string
The AWS account ID of the service owner or
amazon.- private
Dns stringName The private DNS name for the service.
- service
Id string The ID of the endpoint service.
- service
Name string - service
Type string The service type,
GatewayorInterface.- {[key: string]: string}
A map of tags assigned to the resource.
- vpc
Endpoint booleanPolicy Supported Whether or not the service supports endpoint policies -
trueorfalse.- filters
Get
Vpc Endpoint Service Filter[] - service string
- acceptance_
required bool Whether or not VPC endpoint connection requests to the service must be accepted by the service owner -
trueorfalse.- 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_ List[str]dns_ names The DNS names for the service.
- id str
The provider-assigned unique ID for this managed resource.
- manages_
vpc_ boolendpoints Whether or not the service manages its VPC endpoints -
trueorfalse.- owner str
The AWS account ID of the service owner or
amazon.- private_
dns_ strname 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,
GatewayorInterface.- Dict[str, str]
A map of tags assigned to the resource.
- vpc_
endpoint_ boolpolicy_ supported Whether or not the service supports endpoint policies -
trueorfalse.- filters
List[Get
Vpc Endpoint Service Filter] - service str
Supporting Types
GetVpcEndpointServiceFilter
- 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
awsTerraform Provider.