1. Packages
  2. Volcengine
  3. API Docs
  4. privatelink
  5. VpcEndpointServices
Volcengine v0.0.24 published on Tuesday, Jun 25, 2024 by Volcengine

volcengine.privatelink.VpcEndpointServices

Explore with Pulumi AI

volcengine logo
Volcengine v0.0.24 published on Tuesday, Jun 25, 2024 by Volcengine

    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.
    NameRegex string
    A Name Regex of vpc endpoint service.
    OutputFile string
    File name where to save data source results.
    ServiceName string
    The name of vpc endpoint service.
    Ids []string
    The IDs of vpc endpoint service.
    NameRegex string
    A Name Regex of vpc endpoint service.
    OutputFile string
    File name where to save data source results.
    ServiceName string
    The name of vpc endpoint service.
    ids List<String>
    The IDs of vpc endpoint service.
    nameRegex String
    A Name Regex of vpc endpoint service.
    outputFile String
    File name where to save data source results.
    serviceName String
    The name of vpc endpoint service.
    ids string[]
    The IDs of vpc endpoint service.
    nameRegex string
    A Name Regex of vpc endpoint service.
    outputFile string
    File name where to save data source results.
    serviceName 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.
    nameRegex String
    A Name Regex of vpc endpoint service.
    outputFile String
    File name where to save data source results.
    serviceName 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<Pulumi.Volcengine.Privatelink.Outputs.VpcEndpointServicesService>
    The collection of query.
    TotalCount int
    Returns the total amount of the data list.
    Ids List<string>
    NameRegex string
    OutputFile string
    ServiceName string
    The name of service.
    Id string
    The provider-assigned unique ID for this managed resource.
    Services []VpcEndpointServicesService
    The collection of query.
    TotalCount int
    Returns the total amount of the data list.
    Ids []string
    NameRegex string
    OutputFile string
    ServiceName string
    The name of service.
    id String
    The provider-assigned unique ID for this managed resource.
    services List<VpcEndpointServicesService>
    The collection of query.
    totalCount Integer
    Returns the total amount of the data list.
    ids List<String>
    nameRegex String
    outputFile String
    serviceName String
    The name of service.
    id string
    The provider-assigned unique ID for this managed resource.
    services VpcEndpointServicesService[]
    The collection of query.
    totalCount number
    Returns the total amount of the data list.
    ids string[]
    nameRegex string
    outputFile string
    serviceName string
    The name of service.
    id str
    The provider-assigned unique ID for this managed resource.
    services Sequence[VpcEndpointServicesService]
    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.
    totalCount Number
    Returns the total amount of the data list.
    ids List<String>
    nameRegex String
    outputFile String
    serviceName String
    The name of service.

    Supporting Types

    VpcEndpointServicesService

    AutoAcceptEnabled bool
    Whether auto accept node connect.
    CreationTime string
    The create time of service.
    Description string
    The description of service.
    Id string
    The Id of service.
    Resources List<Pulumi.Volcengine.Privatelink.Inputs.VpcEndpointServicesServiceResource>
    The resources info.
    ServiceDomain string
    The domain of service.
    ServiceId string
    The Id of service.
    ServiceName string
    The name of vpc endpoint service.
    ServiceResourceType string
    The resource type of service.
    ServiceType string
    The type of service.
    Status string
    The status of service.
    UpdateTime string
    The update time of service.
    ZoneIds List<string>
    The IDs of zones.
    AutoAcceptEnabled bool
    Whether auto accept node connect.
    CreationTime string
    The create time of service.
    Description string
    The description of service.
    Id string
    The Id of service.
    Resources []VpcEndpointServicesServiceResource
    The resources info.
    ServiceDomain string
    The domain of service.
    ServiceId string
    The Id of service.
    ServiceName string
    The name of vpc endpoint service.
    ServiceResourceType string
    The resource type of service.
    ServiceType string
    The type of service.
    Status string
    The status of service.
    UpdateTime string
    The update time of service.
    ZoneIds []string
    The IDs of zones.
    autoAcceptEnabled Boolean
    Whether auto accept node connect.
    creationTime String
    The create time of service.
    description String
    The description of service.
    id String
    The Id of service.
    resources List<VpcEndpointServicesServiceResource>
    The resources info.
    serviceDomain String
    The domain of service.
    serviceId String
    The Id of service.
    serviceName String
    The name of vpc endpoint service.
    serviceResourceType String
    The resource type of service.
    serviceType String
    The type of service.
    status String
    The status of service.
    updateTime String
    The update time of service.
    zoneIds List<String>
    The IDs of zones.
    autoAcceptEnabled boolean
    Whether auto accept node connect.
    creationTime string
    The create time of service.
    description string
    The description of service.
    id string
    The Id of service.
    resources VpcEndpointServicesServiceResource[]
    The resources info.
    serviceDomain string
    The domain of service.
    serviceId string
    The Id of service.
    serviceName string
    The name of vpc endpoint service.
    serviceResourceType string
    The resource type of service.
    serviceType string
    The type of service.
    status string
    The status of service.
    updateTime string
    The update time of service.
    zoneIds string[]
    The IDs of zones.
    auto_accept_enabled bool
    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[VpcEndpointServicesServiceResource]
    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_type str
    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.
    autoAcceptEnabled Boolean
    Whether auto accept node connect.
    creationTime 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.
    serviceDomain String
    The domain of service.
    serviceId String
    The Id of service.
    serviceName String
    The name of vpc endpoint service.
    serviceResourceType String
    The resource type of service.
    serviceType String
    The type of service.
    status String
    The status of service.
    updateTime String
    The update time of service.
    zoneIds List<String>
    The IDs of zones.

    VpcEndpointServicesServiceResource

    ResourceId string
    The id of resource.
    ResourceType string
    The type of resource.
    ZoneId string
    The zone id of resource.
    ResourceId string
    The id of resource.
    ResourceType string
    The type of resource.
    ZoneId string
    The zone id of resource.
    resourceId String
    The id of resource.
    resourceType String
    The type of resource.
    zoneId String
    The zone id of resource.
    resourceId string
    The id of resource.
    resourceType string
    The type of resource.
    zoneId 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.
    resourceId String
    The id of resource.
    resourceType String
    The type of resource.
    zoneId 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.
    volcengine logo
    Volcengine v0.0.24 published on Tuesday, Jun 25, 2024 by Volcengine