Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi
alicloud.privatelink.getVpcEndpointServiceResources
Explore with Pulumi AI
This data source provides the Privatelink Vpc Endpoint Service Resources of the current Alibaba Cloud user.
NOTE: Available in v1.110.0+.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const example = alicloud.privatelink.getVpcEndpointServiceResources({
serviceId: "epsrv-gw8ii1xxxx",
});
export const firstPrivatelinkVpcEndpointServiceResourceId = example.then(example => example.resources?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
example = alicloud.privatelink.get_vpc_endpoint_service_resources(service_id="epsrv-gw8ii1xxxx")
pulumi.export("firstPrivatelinkVpcEndpointServiceResourceId", example.resources[0].id)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/privatelink"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := privatelink.GetVpcEndpointServiceResources(ctx, &privatelink.GetVpcEndpointServiceResourcesArgs{
ServiceId: "epsrv-gw8ii1xxxx",
}, nil)
if err != nil {
return err
}
ctx.Export("firstPrivatelinkVpcEndpointServiceResourceId", example.Resources[0].Id)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var example = AliCloud.PrivateLink.GetVpcEndpointServiceResources.Invoke(new()
{
ServiceId = "epsrv-gw8ii1xxxx",
});
return new Dictionary<string, object?>
{
["firstPrivatelinkVpcEndpointServiceResourceId"] = example.Apply(getVpcEndpointServiceResourcesResult => getVpcEndpointServiceResourcesResult.Resources[0]?.Id),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.privatelink.PrivatelinkFunctions;
import com.pulumi.alicloud.privatelink.inputs.GetVpcEndpointServiceResourcesArgs;
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 example = PrivatelinkFunctions.getVpcEndpointServiceResources(GetVpcEndpointServiceResourcesArgs.builder()
.serviceId("epsrv-gw8ii1xxxx")
.build());
ctx.export("firstPrivatelinkVpcEndpointServiceResourceId", example.applyValue(getVpcEndpointServiceResourcesResult -> getVpcEndpointServiceResourcesResult.resources()[0].id()));
}
}
variables:
example:
fn::invoke:
Function: alicloud:privatelink:getVpcEndpointServiceResources
Arguments:
serviceId: epsrv-gw8ii1xxxx
outputs:
firstPrivatelinkVpcEndpointServiceResourceId: ${example.resources[0].id}
Using getVpcEndpointServiceResources
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 getVpcEndpointServiceResources(args: GetVpcEndpointServiceResourcesArgs, opts?: InvokeOptions): Promise<GetVpcEndpointServiceResourcesResult>
function getVpcEndpointServiceResourcesOutput(args: GetVpcEndpointServiceResourcesOutputArgs, opts?: InvokeOptions): Output<GetVpcEndpointServiceResourcesResult>
def get_vpc_endpoint_service_resources(output_file: Optional[str] = None,
service_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetVpcEndpointServiceResourcesResult
def get_vpc_endpoint_service_resources_output(output_file: Optional[pulumi.Input[str]] = None,
service_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetVpcEndpointServiceResourcesResult]
func GetVpcEndpointServiceResources(ctx *Context, args *GetVpcEndpointServiceResourcesArgs, opts ...InvokeOption) (*GetVpcEndpointServiceResourcesResult, error)
func GetVpcEndpointServiceResourcesOutput(ctx *Context, args *GetVpcEndpointServiceResourcesOutputArgs, opts ...InvokeOption) GetVpcEndpointServiceResourcesResultOutput
> Note: This function is named GetVpcEndpointServiceResources
in the Go SDK.
public static class GetVpcEndpointServiceResources
{
public static Task<GetVpcEndpointServiceResourcesResult> InvokeAsync(GetVpcEndpointServiceResourcesArgs args, InvokeOptions? opts = null)
public static Output<GetVpcEndpointServiceResourcesResult> Invoke(GetVpcEndpointServiceResourcesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetVpcEndpointServiceResourcesResult> getVpcEndpointServiceResources(GetVpcEndpointServiceResourcesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:privatelink/getVpcEndpointServiceResources:getVpcEndpointServiceResources
arguments:
# arguments dictionary
The following arguments are supported:
- Service
Id string - The ID of Vpc Endpoint Service.
- Output
File string - File name where to save data source results (after running
pulumi preview
).
- Service
Id string - The ID of Vpc Endpoint Service.
- Output
File string - File name where to save data source results (after running
pulumi preview
).
- service
Id String - The ID of Vpc Endpoint Service.
- output
File String - File name where to save data source results (after running
pulumi preview
).
- service
Id string - The ID of Vpc Endpoint Service.
- output
File string - File name where to save data source results (after running
pulumi preview
).
- service_
id str - The ID of Vpc Endpoint Service.
- output_
file str - File name where to save data source results (after running
pulumi preview
).
- service
Id String - The ID of Vpc Endpoint Service.
- output
File String - File name where to save data source results (after running
pulumi preview
).
getVpcEndpointServiceResources Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Resources
List<Pulumi.
Ali Cloud. Private Link. Outputs. Get Vpc Endpoint Service Resources Resource> - Service
Id string - Output
File string
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Resources
[]Get
Vpc Endpoint Service Resources Resource - Service
Id string - Output
File string
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- resources
List<Get
Vpc Endpoint Service Resources Resource> - service
Id String - output
File String
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- resources
Get
Vpc Endpoint Service Resources Resource[] - service
Id string - output
File string
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- resources
Sequence[Get
Vpc Endpoint Service Resources Resource] - service_
id str - output_
file str
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- resources List<Property Map>
- service
Id String - output
File String
Supporting Types
GetVpcEndpointServiceResourcesResource
- Id string
- The ID of the Vpc Endpoint Service Resource.
- Resource
Id string - The ID of Resource.
- Resource
Type string - The type of Resource.
- Id string
- The ID of the Vpc Endpoint Service Resource.
- Resource
Id string - The ID of Resource.
- Resource
Type string - The type of Resource.
- id String
- The ID of the Vpc Endpoint Service Resource.
- resource
Id String - The ID of Resource.
- resource
Type String - The type of Resource.
- id string
- The ID of the Vpc Endpoint Service Resource.
- resource
Id string - The ID of Resource.
- resource
Type string - The type of Resource.
- id str
- The ID of the Vpc Endpoint Service Resource.
- resource_
id str - The ID of Resource.
- resource_
type str - The type of Resource.
- id String
- The ID of the Vpc Endpoint Service Resource.
- resource
Id String - The ID of Resource.
- resource
Type String - The type of Resource.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.