Volcengine v0.0.26 published on Friday, Sep 13, 2024 by Volcengine
volcengine.privatelink.VpcEndpointServices
Explore with Pulumi AI
Use this data source to query detailed information of privatelink vpc endpoint services
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;
return await Deployment.RunAsync(() =>
{
var fooZones = Volcengine.Ecs.Zones.Invoke();
var fooVpc = new Volcengine.Vpc.Vpc("fooVpc", new()
{
VpcName = "acc-test-vpc",
CidrBlock = "172.16.0.0/16",
});
var fooSubnet = new Volcengine.Vpc.Subnet("fooSubnet", new()
{
SubnetName = "acc-test-subnet",
CidrBlock = "172.16.0.0/24",
ZoneId = fooZones.Apply(zonesResult => zonesResult.Zones[0]?.Id),
VpcId = fooVpc.Id,
});
var fooClb = new Volcengine.Clb.Clb("fooClb", new()
{
Type = "public",
SubnetId = fooSubnet.Id,
LoadBalancerSpec = "small_1",
Description = "acc-test-demo",
LoadBalancerName = "acc-test-clb",
LoadBalancerBillingType = "PostPaid",
EipBillingConfig = new Volcengine.Clb.Inputs.ClbEipBillingConfigArgs
{
Isp = "BGP",
EipBillingType = "PostPaidByBandwidth",
Bandwidth = 1,
},
Tags = new[]
{
new Volcengine.Clb.Inputs.ClbTagArgs
{
Key = "k1",
Value = "v1",
},
},
});
var fooVpcEndpointService = new List<Volcengine.Privatelink.VpcEndpointService>();
for (var rangeIndex = 0; rangeIndex < 2; rangeIndex++)
{
var range = new { Value = rangeIndex };
fooVpcEndpointService.Add(new Volcengine.Privatelink.VpcEndpointService($"fooVpcEndpointService-{range.Value}", new()
{
Resources = new[]
{
new Volcengine.Privatelink.Inputs.VpcEndpointServiceResourceArgs
{
ResourceId = fooClb.Id,
ResourceType = "CLB",
},
},
Description = "acc-test",
AutoAcceptEnabled = true,
}));
}
var fooVpcEndpointServices = Volcengine.Privatelink.VpcEndpointServices.Invoke(new()
{
Ids = fooVpcEndpointService.Select(__item => __item.Id).ToList(),
});
});
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/clb"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/ecs"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/privatelink"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/vpc"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
fooZones, err := ecs.Zones(ctx, nil, nil);
if err != nil {
return err
}
fooVpc, err := vpc.NewVpc(ctx, "fooVpc", &vpc.VpcArgs{
VpcName: pulumi.String("acc-test-vpc"),
CidrBlock: pulumi.String("172.16.0.0/16"),
})
if err != nil {
return err
}
fooSubnet, err := vpc.NewSubnet(ctx, "fooSubnet", &vpc.SubnetArgs{
SubnetName: pulumi.String("acc-test-subnet"),
CidrBlock: pulumi.String("172.16.0.0/24"),
ZoneId: *pulumi.String(fooZones.Zones[0].Id),
VpcId: fooVpc.ID(),
})
if err != nil {
return err
}
fooClb, err := clb.NewClb(ctx, "fooClb", &clb.ClbArgs{
Type: pulumi.String("public"),
SubnetId: fooSubnet.ID(),
LoadBalancerSpec: pulumi.String("small_1"),
Description: pulumi.String("acc-test-demo"),
LoadBalancerName: pulumi.String("acc-test-clb"),
LoadBalancerBillingType: pulumi.String("PostPaid"),
EipBillingConfig: &clb.ClbEipBillingConfigArgs{
Isp: pulumi.String("BGP"),
EipBillingType: pulumi.String("PostPaidByBandwidth"),
Bandwidth: pulumi.Int(1),
},
Tags: clb.ClbTagArray{
&clb.ClbTagArgs{
Key: pulumi.String("k1"),
Value: pulumi.String("v1"),
},
},
})
if err != nil {
return err
}
var fooVpcEndpointService []*privatelink.VpcEndpointService
for index := 0; index < 2; index++ {
key0 := index
_ := index
__res, err := privatelink.NewVpcEndpointService(ctx, fmt.Sprintf("fooVpcEndpointService-%v", key0), &privatelink.VpcEndpointServiceArgs{
Resources: privatelink.VpcEndpointServiceResourceTypeArray{
&privatelink.VpcEndpointServiceResourceTypeArgs{
ResourceId: fooClb.ID(),
ResourceType: pulumi.String("CLB"),
},
},
Description: pulumi.String("acc-test"),
AutoAcceptEnabled: pulumi.Bool(true),
})
if err != nil {
return err
}
fooVpcEndpointService = append(fooVpcEndpointService, __res)
}
_ = privatelink.VpcEndpointServicesOutput(ctx, privatelink.VpcEndpointServicesOutputArgs{
Ids: %!v(PANIC=Format method: fatal: A failure has occurred: unlowered splat expression @ #-functions-volcengine:privatelink-vpcEndpointServices:VpcEndpointServices.pp:42,9-36),
}, nil);
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.volcengine.ecs.EcsFunctions;
import com.pulumi.volcengine.ecs.inputs.ZonesArgs;
import com.pulumi.volcengine.vpc.Vpc;
import com.pulumi.volcengine.vpc.VpcArgs;
import com.pulumi.volcengine.vpc.Subnet;
import com.pulumi.volcengine.vpc.SubnetArgs;
import com.pulumi.volcengine.clb.Clb;
import com.pulumi.volcengine.clb.ClbArgs;
import com.pulumi.volcengine.clb.inputs.ClbEipBillingConfigArgs;
import com.pulumi.volcengine.clb.inputs.ClbTagArgs;
import com.pulumi.volcengine.privatelink.VpcEndpointService;
import com.pulumi.volcengine.privatelink.VpcEndpointServiceArgs;
import com.pulumi.volcengine.privatelink.inputs.VpcEndpointServiceResourceArgs;
import com.pulumi.volcengine.privatelink.PrivatelinkFunctions;
import com.pulumi.volcengine.privatelink_vpcEndpointServices.inputs.VpcEndpointServicesArgs;
import com.pulumi.codegen.internal.KeyedValue;
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 fooZones = EcsFunctions.Zones();
var fooVpc = new Vpc("fooVpc", VpcArgs.builder()
.vpcName("acc-test-vpc")
.cidrBlock("172.16.0.0/16")
.build());
var fooSubnet = new Subnet("fooSubnet", SubnetArgs.builder()
.subnetName("acc-test-subnet")
.cidrBlock("172.16.0.0/24")
.zoneId(fooZones.applyValue(zonesResult -> zonesResult.zones()[0].id()))
.vpcId(fooVpc.id())
.build());
var fooClb = new Clb("fooClb", ClbArgs.builder()
.type("public")
.subnetId(fooSubnet.id())
.loadBalancerSpec("small_1")
.description("acc-test-demo")
.loadBalancerName("acc-test-clb")
.loadBalancerBillingType("PostPaid")
.eipBillingConfig(ClbEipBillingConfigArgs.builder()
.isp("BGP")
.eipBillingType("PostPaidByBandwidth")
.bandwidth(1)
.build())
.tags(ClbTagArgs.builder()
.key("k1")
.value("v1")
.build())
.build());
for (var i = 0; i < 2; i++) {
new VpcEndpointService("fooVpcEndpointService-" + i, VpcEndpointServiceArgs.builder()
.resources(VpcEndpointServiceResourceArgs.builder()
.resourceId(fooClb.id())
.resourceType("CLB")
.build())
.description("acc-test")
.autoAcceptEnabled(true)
.build());
}
final var fooVpcEndpointServices = PrivatelinkFunctions.VpcEndpointServices(VpcEndpointServicesArgs.builder()
.ids(fooVpcEndpointService.stream().map(element -> element.id()).collect(toList()))
.build());
}
}
import pulumi
import pulumi_volcengine as volcengine
foo_zones = volcengine.ecs.zones()
foo_vpc = volcengine.vpc.Vpc("fooVpc",
vpc_name="acc-test-vpc",
cidr_block="172.16.0.0/16")
foo_subnet = volcengine.vpc.Subnet("fooSubnet",
subnet_name="acc-test-subnet",
cidr_block="172.16.0.0/24",
zone_id=foo_zones.zones[0].id,
vpc_id=foo_vpc.id)
foo_clb = volcengine.clb.Clb("fooClb",
type="public",
subnet_id=foo_subnet.id,
load_balancer_spec="small_1",
description="acc-test-demo",
load_balancer_name="acc-test-clb",
load_balancer_billing_type="PostPaid",
eip_billing_config=volcengine.clb.ClbEipBillingConfigArgs(
isp="BGP",
eip_billing_type="PostPaidByBandwidth",
bandwidth=1,
),
tags=[volcengine.clb.ClbTagArgs(
key="k1",
value="v1",
)])
foo_vpc_endpoint_service = []
for range in [{"value": i} for i in range(0, 2)]:
foo_vpc_endpoint_service.append(volcengine.privatelink.VpcEndpointService(f"fooVpcEndpointService-{range['value']}",
resources=[volcengine.privatelink.VpcEndpointServiceResourceArgs(
resource_id=foo_clb.id,
resource_type="CLB",
)],
description="acc-test",
auto_accept_enabled=True))
foo_vpc_endpoint_services = volcengine.privatelink.vpc_endpoint_services_output(ids=[__item.id for __item in foo_vpc_endpoint_service])
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@pulumi/volcengine";
import * as volcengine from "@volcengine/pulumi";
const fooZones = volcengine.ecs.Zones({});
const fooVpc = new volcengine.vpc.Vpc("fooVpc", {
vpcName: "acc-test-vpc",
cidrBlock: "172.16.0.0/16",
});
const fooSubnet = new volcengine.vpc.Subnet("fooSubnet", {
subnetName: "acc-test-subnet",
cidrBlock: "172.16.0.0/24",
zoneId: fooZones.then(fooZones => fooZones.zones?.[0]?.id),
vpcId: fooVpc.id,
});
const fooClb = new volcengine.clb.Clb("fooClb", {
type: "public",
subnetId: fooSubnet.id,
loadBalancerSpec: "small_1",
description: "acc-test-demo",
loadBalancerName: "acc-test-clb",
loadBalancerBillingType: "PostPaid",
eipBillingConfig: {
isp: "BGP",
eipBillingType: "PostPaidByBandwidth",
bandwidth: 1,
},
tags: [{
key: "k1",
value: "v1",
}],
});
const fooVpcEndpointService: volcengine.privatelink.VpcEndpointService[] = [];
for (const range = {value: 0}; range.value < 2; range.value++) {
fooVpcEndpointService.push(new volcengine.privatelink.VpcEndpointService(`fooVpcEndpointService-${range.value}`, {
resources: [{
resourceId: fooClb.id,
resourceType: "CLB",
}],
description: "acc-test",
autoAcceptEnabled: true,
}));
}
const fooVpcEndpointServices = volcengine.privatelink.VpcEndpointServicesOutput({
ids: fooVpcEndpointService.map(__item => __item.id),
});
Coming soon!
Using VpcEndpointServices
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 vpcEndpointServices(args: VpcEndpointServicesArgs, opts?: InvokeOptions): Promise<VpcEndpointServicesResult>
function vpcEndpointServicesOutput(args: VpcEndpointServicesOutputArgs, opts?: InvokeOptions): Output<VpcEndpointServicesResult>
def vpc_endpoint_services(ids: Optional[Sequence[str]] = None,
name_regex: Optional[str] = None,
output_file: Optional[str] = None,
service_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> VpcEndpointServicesResult
def vpc_endpoint_services_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
name_regex: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
service_name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[VpcEndpointServicesResult]
func VpcEndpointServices(ctx *Context, args *VpcEndpointServicesArgs, opts ...InvokeOption) (*VpcEndpointServicesResult, error)
func VpcEndpointServicesOutput(ctx *Context, args *VpcEndpointServicesOutputArgs, opts ...InvokeOption) VpcEndpointServicesResultOutput
public static class VpcEndpointServices
{
public static Task<VpcEndpointServicesResult> InvokeAsync(VpcEndpointServicesArgs args, InvokeOptions? opts = null)
public static Output<VpcEndpointServicesResult> Invoke(VpcEndpointServicesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<VpcEndpointServicesResult> vpcEndpointServices(VpcEndpointServicesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: volcengine:privatelink:VpcEndpointServices
arguments:
# arguments dictionary
The following arguments are supported:
- Ids List<string>
- The IDs of vpc endpoint service.
- Name
Regex string - A Name Regex of vpc endpoint service.
- Output
File string - File name where to save data source results.
- Service
Name string - The name of vpc endpoint service.
- Ids []string
- The IDs of vpc endpoint service.
- Name
Regex string - A Name Regex of vpc endpoint service.
- Output
File string - File name where to save data source results.
- Service
Name string - The name of vpc endpoint service.
- ids List<String>
- The IDs of vpc endpoint service.
- name
Regex String - A Name Regex of vpc endpoint service.
- output
File String - File name where to save data source results.
- service
Name String - The name of vpc endpoint service.
- ids string[]
- The IDs of vpc endpoint service.
- name
Regex string - A Name Regex of vpc endpoint service.
- output
File string - File name where to save data source results.
- service
Name string - The name of vpc endpoint service.
- ids Sequence[str]
- The IDs of vpc endpoint service.
- name_
regex str - A Name Regex of vpc endpoint service.
- output_
file str - File name where to save data source results.
- service_
name str - The name of vpc endpoint service.
- ids List<String>
- The IDs of vpc endpoint service.
- name
Regex String - A Name Regex of vpc endpoint service.
- output
File String - File name where to save data source results.
- service
Name String - The name of vpc endpoint service.
VpcEndpointServices Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Services
List<Vpc
Endpoint Services Service> - The collection of query.
- Total
Count int - Returns the total amount of the data list.
- Ids List<string>
- Name
Regex string - Output
File string - Service
Name string - The name of service.
- Id string
- The provider-assigned unique ID for this managed resource.
- Services
[]Vpc
Endpoint Services Service - The collection of query.
- Total
Count int - Returns the total amount of the data list.
- Ids []string
- Name
Regex string - Output
File string - Service
Name string - The name of service.
- id String
- The provider-assigned unique ID for this managed resource.
- services
List<Vpc
Endpoint Services Service> - The collection of query.
- total
Count Integer - Returns the total amount of the data list.
- ids List<String>
- name
Regex String - output
File String - service
Name String - The name of service.
- id string
- The provider-assigned unique ID for this managed resource.
- services
Vpc
Endpoint Services Service[] - The collection of query.
- total
Count number - Returns the total amount of the data list.
- ids string[]
- name
Regex string - output
File string - service
Name string - The name of service.
- id str
- The provider-assigned unique ID for this managed resource.
- services
Sequence[Vpc
Endpoint Services Service] - The collection of query.
- total_
count int - Returns the total amount of the data list.
- ids Sequence[str]
- name_
regex str - output_
file str - service_
name str - The name of service.
- id String
- The provider-assigned unique ID for this managed resource.
- services List<Property Map>
- The collection of query.
- total
Count Number - Returns the total amount of the data list.
- ids List<String>
- name
Regex String - output
File String - service
Name String - The name of service.
Supporting Types
VpcEndpointServicesService
- Auto
Accept boolEnabled - Whether auto accept node connect.
- Creation
Time string - The create time of service.
- Description string
- The description of service.
- Id string
- The Id of service.
- Resources
List<Vpc
Endpoint Services Service Resource> - The resources info.
- Service
Domain string - The domain of service.
- Service
Id string - The Id of service.
- Service
Name string - The name of vpc endpoint service.
- Service
Resource stringType - The resource type of service.
- Service
Type string - The type of service.
- Status string
- The status of service.
- Update
Time string - The update time of service.
- Zone
Ids List<string> - The IDs of zones.
- Auto
Accept boolEnabled - Whether auto accept node connect.
- Creation
Time string - The create time of service.
- Description string
- The description of service.
- Id string
- The Id of service.
- Resources
[]Vpc
Endpoint Services Service Resource - The resources info.
- Service
Domain string - The domain of service.
- Service
Id string - The Id of service.
- Service
Name string - The name of vpc endpoint service.
- Service
Resource stringType - The resource type of service.
- Service
Type string - The type of service.
- Status string
- The status of service.
- Update
Time string - The update time of service.
- Zone
Ids []string - The IDs of zones.
- auto
Accept BooleanEnabled - Whether auto accept node connect.
- creation
Time String - The create time of service.
- description String
- The description of service.
- id String
- The Id of service.
- resources
List<Vpc
Endpoint Services Service Resource> - The resources info.
- service
Domain String - The domain of service.
- service
Id String - The Id of service.
- service
Name String - The name of vpc endpoint service.
- service
Resource StringType - The resource type of service.
- service
Type String - The type of service.
- status String
- The status of service.
- update
Time String - The update time of service.
- zone
Ids List<String> - The IDs of zones.
- auto
Accept booleanEnabled - Whether auto accept node connect.
- creation
Time string - The create time of service.
- description string
- The description of service.
- id string
- The Id of service.
- resources
Vpc
Endpoint Services Service Resource[] - The resources info.
- service
Domain string - The domain of service.
- service
Id string - The Id of service.
- service
Name string - The name of vpc endpoint service.
- service
Resource stringType - The resource type of service.
- service
Type string - The type of service.
- status string
- The status of service.
- update
Time string - The update time of service.
- zone
Ids string[] - The IDs of zones.
- auto_
accept_ boolenabled - Whether auto accept node connect.
- creation_
time str - The create time of service.
- description str
- The description of service.
- id str
- The Id of service.
- resources
Sequence[Vpc
Endpoint Services Service Resource] - The resources info.
- service_
domain str - The domain of service.
- service_
id str - The Id of service.
- service_
name str - The name of vpc endpoint service.
- service_
resource_ strtype - The resource type of service.
- service_
type str - The type of service.
- status str
- The status of service.
- update_
time str - The update time of service.
- zone_
ids Sequence[str] - The IDs of zones.
- auto
Accept BooleanEnabled - Whether auto accept node connect.
- creation
Time String - The create time of service.
- description String
- The description of service.
- id String
- The Id of service.
- resources List<Property Map>
- The resources info.
- service
Domain String - The domain of service.
- service
Id String - The Id of service.
- service
Name String - The name of vpc endpoint service.
- service
Resource StringType - The resource type of service.
- service
Type String - The type of service.
- status String
- The status of service.
- update
Time String - The update time of service.
- zone
Ids List<String> - The IDs of zones.
VpcEndpointServicesServiceResource
- Resource
Id string - The id of resource.
- Resource
Type string - The type of resource.
- Zone
Id string - The zone id of resource.
- Resource
Id string - The id of resource.
- Resource
Type string - The type of resource.
- Zone
Id string - The zone id of resource.
- resource
Id String - The id of resource.
- resource
Type String - The type of resource.
- zone
Id String - The zone id of resource.
- resource
Id string - The id of resource.
- resource
Type string - The type of resource.
- zone
Id string - The zone id of resource.
- resource_
id str - The id of resource.
- resource_
type str - The type of resource.
- zone_
id str - The zone id of resource.
- resource
Id String - The id of resource.
- resource
Type String - The type of resource.
- zone
Id String - The zone id of resource.
Package Details
- Repository
- volcengine volcengine/pulumi-volcengine
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
volcengine
Terraform Provider.