Volcengine v0.0.24 published on Tuesday, Jun 25, 2024 by Volcengine
volcengine.privatelink.VpcEndpointServicePermissions
Explore with Pulumi AI
Use this data source to query detailed information of privatelink vpc endpoint service permissions
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 Volcengine.Privatelink.VpcEndpointService("fooVpcEndpointService", new()
{
Resources = new[]
{
new Volcengine.Privatelink.Inputs.VpcEndpointServiceResourceArgs
{
ResourceId = fooClb.Id,
ResourceType = "CLB",
},
},
Description = "acc-test",
AutoAcceptEnabled = true,
});
var fooVpcEndpointServicePermission = new Volcengine.Privatelink.VpcEndpointServicePermission("fooVpcEndpointServicePermission", new()
{
ServiceId = fooVpcEndpointService.Id,
PermitAccountId = "210000000",
});
var fooVpcEndpointServicePermissions = Volcengine.Privatelink.VpcEndpointServicePermissions.Invoke(new()
{
PermitAccountId = fooVpcEndpointServicePermission.PermitAccountId,
ServiceId = fooVpcEndpointService.Id,
});
});
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
}
fooVpcEndpointService, err := privatelink.NewVpcEndpointService(ctx, "fooVpcEndpointService", &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
}
fooVpcEndpointServicePermission, err := privatelink.NewVpcEndpointServicePermission(ctx, "fooVpcEndpointServicePermission", &privatelink.VpcEndpointServicePermissionArgs{
ServiceId: fooVpcEndpointService.ID(),
PermitAccountId: pulumi.String("210000000"),
})
if err != nil {
return err
}
_ = privatelink.VpcEndpointServicePermissionsOutput(ctx, privatelink.VpcEndpointServicePermissionsOutputArgs{
PermitAccountId: fooVpcEndpointServicePermission.PermitAccountId,
ServiceId: fooVpcEndpointService.ID(),
}, 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.VpcEndpointServicePermission;
import com.pulumi.volcengine.privatelink.VpcEndpointServicePermissionArgs;
import com.pulumi.volcengine.privatelink.PrivatelinkFunctions;
import com.pulumi.volcengine.privatelink_vpcEndpointServicePermissions.inputs.VpcEndpointServicePermissionsArgs;
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());
var fooVpcEndpointService = new VpcEndpointService("fooVpcEndpointService", VpcEndpointServiceArgs.builder()
.resources(VpcEndpointServiceResourceArgs.builder()
.resourceId(fooClb.id())
.resourceType("CLB")
.build())
.description("acc-test")
.autoAcceptEnabled(true)
.build());
var fooVpcEndpointServicePermission = new VpcEndpointServicePermission("fooVpcEndpointServicePermission", VpcEndpointServicePermissionArgs.builder()
.serviceId(fooVpcEndpointService.id())
.permitAccountId("210000000")
.build());
final var fooVpcEndpointServicePermissions = PrivatelinkFunctions.VpcEndpointServicePermissions(VpcEndpointServicePermissionsArgs.builder()
.permitAccountId(fooVpcEndpointServicePermission.permitAccountId())
.serviceId(fooVpcEndpointService.id())
.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 = volcengine.privatelink.VpcEndpointService("fooVpcEndpointService",
resources=[volcengine.privatelink.VpcEndpointServiceResourceArgs(
resource_id=foo_clb.id,
resource_type="CLB",
)],
description="acc-test",
auto_accept_enabled=True)
foo_vpc_endpoint_service_permission = volcengine.privatelink.VpcEndpointServicePermission("fooVpcEndpointServicePermission",
service_id=foo_vpc_endpoint_service.id,
permit_account_id="210000000")
foo_vpc_endpoint_service_permissions = volcengine.privatelink.vpc_endpoint_service_permissions_output(permit_account_id=foo_vpc_endpoint_service_permission.permit_account_id,
service_id=foo_vpc_endpoint_service.id)
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 = new volcengine.privatelink.VpcEndpointService("fooVpcEndpointService", {
resources: [{
resourceId: fooClb.id,
resourceType: "CLB",
}],
description: "acc-test",
autoAcceptEnabled: true,
});
const fooVpcEndpointServicePermission = new volcengine.privatelink.VpcEndpointServicePermission("fooVpcEndpointServicePermission", {
serviceId: fooVpcEndpointService.id,
permitAccountId: "210000000",
});
const fooVpcEndpointServicePermissions = volcengine.privatelink.VpcEndpointServicePermissionsOutput({
permitAccountId: fooVpcEndpointServicePermission.permitAccountId,
serviceId: fooVpcEndpointService.id,
});
resources:
fooVpc:
type: volcengine:vpc:Vpc
properties:
vpcName: acc-test-vpc
cidrBlock: 172.16.0.0/16
fooSubnet:
type: volcengine:vpc:Subnet
properties:
subnetName: acc-test-subnet
cidrBlock: 172.16.0.0/24
zoneId: ${fooZones.zones[0].id}
vpcId: ${fooVpc.id}
fooClb:
type: volcengine:clb:Clb
properties:
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
fooVpcEndpointService:
type: volcengine:privatelink:VpcEndpointService
properties:
resources:
- resourceId: ${fooClb.id}
resourceType: CLB
description: acc-test
autoAcceptEnabled: true
fooVpcEndpointServicePermission:
type: volcengine:privatelink:VpcEndpointServicePermission
properties:
serviceId: ${fooVpcEndpointService.id}
permitAccountId: '210000000'
variables:
fooZones:
fn::invoke:
Function: volcengine:ecs:Zones
Arguments: {}
fooVpcEndpointServicePermissions:
fn::invoke:
Function: volcengine:privatelink:VpcEndpointServicePermissions
Arguments:
permitAccountId: ${fooVpcEndpointServicePermission.permitAccountId}
serviceId: ${fooVpcEndpointService.id}
Using VpcEndpointServicePermissions
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 vpcEndpointServicePermissions(args: VpcEndpointServicePermissionsArgs, opts?: InvokeOptions): Promise<VpcEndpointServicePermissionsResult>
function vpcEndpointServicePermissionsOutput(args: VpcEndpointServicePermissionsOutputArgs, opts?: InvokeOptions): Output<VpcEndpointServicePermissionsResult>
def vpc_endpoint_service_permissions(output_file: Optional[str] = None,
permit_account_id: Optional[str] = None,
service_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> VpcEndpointServicePermissionsResult
def vpc_endpoint_service_permissions_output(output_file: Optional[pulumi.Input[str]] = None,
permit_account_id: Optional[pulumi.Input[str]] = None,
service_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[VpcEndpointServicePermissionsResult]
func VpcEndpointServicePermissions(ctx *Context, args *VpcEndpointServicePermissionsArgs, opts ...InvokeOption) (*VpcEndpointServicePermissionsResult, error)
func VpcEndpointServicePermissionsOutput(ctx *Context, args *VpcEndpointServicePermissionsOutputArgs, opts ...InvokeOption) VpcEndpointServicePermissionsResultOutput
public static class VpcEndpointServicePermissions
{
public static Task<VpcEndpointServicePermissionsResult> InvokeAsync(VpcEndpointServicePermissionsArgs args, InvokeOptions? opts = null)
public static Output<VpcEndpointServicePermissionsResult> Invoke(VpcEndpointServicePermissionsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<VpcEndpointServicePermissionsResult> vpcEndpointServicePermissions(VpcEndpointServicePermissionsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: volcengine:privatelink:VpcEndpointServicePermissions
arguments:
# arguments dictionary
The following arguments are supported:
- Service
Id string - The Id of service.
- Output
File string - File name where to save data source results.
- Permit
Account stringId - The Id of permit account.
- Service
Id string - The Id of service.
- Output
File string - File name where to save data source results.
- Permit
Account stringId - The Id of permit account.
- service
Id String - The Id of service.
- output
File String - File name where to save data source results.
- permit
Account StringId - The Id of permit account.
- service
Id string - The Id of service.
- output
File string - File name where to save data source results.
- permit
Account stringId - The Id of permit account.
- service_
id str - The Id of service.
- output_
file str - File name where to save data source results.
- permit_
account_ strid - The Id of permit account.
- service
Id String - The Id of service.
- output
File String - File name where to save data source results.
- permit
Account StringId - The Id of permit account.
VpcEndpointServicePermissions Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Permissions
List<Pulumi.
Volcengine. Privatelink. Outputs. Vpc Endpoint Service Permissions Permission> - The collection of query.
- Service
Id string - Total
Count int - Returns the total amount of the data list.
- Output
File string - Permit
Account stringId - The permit account id.
- Id string
- The provider-assigned unique ID for this managed resource.
- Permissions
[]Vpc
Endpoint Service Permissions Permission - The collection of query.
- Service
Id string - Total
Count int - Returns the total amount of the data list.
- Output
File string - Permit
Account stringId - The permit account id.
- id String
- The provider-assigned unique ID for this managed resource.
- permissions
List<Vpc
Endpoint Service Permissions Permission> - The collection of query.
- service
Id String - total
Count Integer - Returns the total amount of the data list.
- output
File String - permit
Account StringId - The permit account id.
- id string
- The provider-assigned unique ID for this managed resource.
- permissions
Vpc
Endpoint Service Permissions Permission[] - The collection of query.
- service
Id string - total
Count number - Returns the total amount of the data list.
- output
File string - permit
Account stringId - The permit account id.
- id str
- The provider-assigned unique ID for this managed resource.
- permissions
Sequence[Vpc
Endpoint Service Permissions Permission] - The collection of query.
- service_
id str - total_
count int - Returns the total amount of the data list.
- output_
file str - permit_
account_ strid - The permit account id.
- id String
- The provider-assigned unique ID for this managed resource.
- permissions List<Property Map>
- The collection of query.
- service
Id String - total
Count Number - Returns the total amount of the data list.
- output
File String - permit
Account StringId - The permit account id.
Supporting Types
VpcEndpointServicePermissionsPermission
- Permit
Account stringId - The Id of permit account.
- Permit
Account stringId - The Id of permit account.
- permit
Account StringId - The Id of permit account.
- permit
Account stringId - The Id of permit account.
- permit_
account_ strid - The Id of permit account.
- permit
Account StringId - The Id of permit account.
Package Details
- Repository
- volcengine volcengine/pulumi-volcengine
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
volcengine
Terraform Provider.