1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. pvtz
  5. getEndpoints
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

alicloud.pvtz.getEndpoints

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

    This data source provides the Pvtz Endpoints of the current Alibaba Cloud user.

    NOTE: Available in v1.143.0+.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const ids = alicloud.pvtz.getEndpoints({
        ids: ["example_id"],
    });
    export const pvtzEndpointId1 = ids.then(ids => ids.endpoints?.[0]?.id);
    const nameRegex = alicloud.pvtz.getEndpoints({
        nameRegex: "^my-Endpoint",
    });
    export const pvtzEndpointId2 = nameRegex.then(nameRegex => nameRegex.endpoints?.[0]?.id);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    ids = alicloud.pvtz.get_endpoints(ids=["example_id"])
    pulumi.export("pvtzEndpointId1", ids.endpoints[0].id)
    name_regex = alicloud.pvtz.get_endpoints(name_regex="^my-Endpoint")
    pulumi.export("pvtzEndpointId2", name_regex.endpoints[0].id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/pvtz"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		ids, err := pvtz.GetEndpoints(ctx, &pvtz.GetEndpointsArgs{
    			Ids: []string{
    				"example_id",
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("pvtzEndpointId1", ids.Endpoints[0].Id)
    		nameRegex, err := pvtz.GetEndpoints(ctx, &pvtz.GetEndpointsArgs{
    			NameRegex: pulumi.StringRef("^my-Endpoint"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("pvtzEndpointId2", nameRegex.Endpoints[0].Id)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var ids = AliCloud.Pvtz.GetEndpoints.Invoke(new()
        {
            Ids = new[]
            {
                "example_id",
            },
        });
    
        var nameRegex = AliCloud.Pvtz.GetEndpoints.Invoke(new()
        {
            NameRegex = "^my-Endpoint",
        });
    
        return new Dictionary<string, object?>
        {
            ["pvtzEndpointId1"] = ids.Apply(getEndpointsResult => getEndpointsResult.Endpoints[0]?.Id),
            ["pvtzEndpointId2"] = nameRegex.Apply(getEndpointsResult => getEndpointsResult.Endpoints[0]?.Id),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.pvtz.PvtzFunctions;
    import com.pulumi.alicloud.pvtz.inputs.GetEndpointsArgs;
    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 ids = PvtzFunctions.getEndpoints(GetEndpointsArgs.builder()
                .ids("example_id")
                .build());
    
            ctx.export("pvtzEndpointId1", ids.applyValue(getEndpointsResult -> getEndpointsResult.endpoints()[0].id()));
            final var nameRegex = PvtzFunctions.getEndpoints(GetEndpointsArgs.builder()
                .nameRegex("^my-Endpoint")
                .build());
    
            ctx.export("pvtzEndpointId2", nameRegex.applyValue(getEndpointsResult -> getEndpointsResult.endpoints()[0].id()));
        }
    }
    
    variables:
      ids:
        fn::invoke:
          Function: alicloud:pvtz:getEndpoints
          Arguments:
            ids:
              - example_id
      nameRegex:
        fn::invoke:
          Function: alicloud:pvtz:getEndpoints
          Arguments:
            nameRegex: ^my-Endpoint
    outputs:
      pvtzEndpointId1: ${ids.endpoints[0].id}
      pvtzEndpointId2: ${nameRegex.endpoints[0].id}
    

    Using getEndpoints

    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 getEndpoints(args: GetEndpointsArgs, opts?: InvokeOptions): Promise<GetEndpointsResult>
    function getEndpointsOutput(args: GetEndpointsOutputArgs, opts?: InvokeOptions): Output<GetEndpointsResult>
    def get_endpoints(ids: Optional[Sequence[str]] = None,
                      name_regex: Optional[str] = None,
                      output_file: Optional[str] = None,
                      status: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetEndpointsResult
    def get_endpoints_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                      name_regex: Optional[pulumi.Input[str]] = None,
                      output_file: Optional[pulumi.Input[str]] = None,
                      status: Optional[pulumi.Input[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetEndpointsResult]
    func GetEndpoints(ctx *Context, args *GetEndpointsArgs, opts ...InvokeOption) (*GetEndpointsResult, error)
    func GetEndpointsOutput(ctx *Context, args *GetEndpointsOutputArgs, opts ...InvokeOption) GetEndpointsResultOutput

    > Note: This function is named GetEndpoints in the Go SDK.

    public static class GetEndpoints 
    {
        public static Task<GetEndpointsResult> InvokeAsync(GetEndpointsArgs args, InvokeOptions? opts = null)
        public static Output<GetEndpointsResult> Invoke(GetEndpointsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetEndpointsResult> getEndpoints(GetEndpointsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:pvtz/getEndpoints:getEndpoints
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Ids List<string>
    A list of Endpoint IDs.
    NameRegex string
    A regex string to filter results by Endpoint name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    Status string
    The status of the resource. Valid values: CHANGE_FAILED, CHANGE_INIT, EXCEPTION, FAILED, INIT, SUCCESS.
    Ids []string
    A list of Endpoint IDs.
    NameRegex string
    A regex string to filter results by Endpoint name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    Status string
    The status of the resource. Valid values: CHANGE_FAILED, CHANGE_INIT, EXCEPTION, FAILED, INIT, SUCCESS.
    ids List<String>
    A list of Endpoint IDs.
    nameRegex String
    A regex string to filter results by Endpoint name.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    status String
    The status of the resource. Valid values: CHANGE_FAILED, CHANGE_INIT, EXCEPTION, FAILED, INIT, SUCCESS.
    ids string[]
    A list of Endpoint IDs.
    nameRegex string
    A regex string to filter results by Endpoint name.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    status string
    The status of the resource. Valid values: CHANGE_FAILED, CHANGE_INIT, EXCEPTION, FAILED, INIT, SUCCESS.
    ids Sequence[str]
    A list of Endpoint IDs.
    name_regex str
    A regex string to filter results by Endpoint name.
    output_file str
    File name where to save data source results (after running pulumi preview).
    status str
    The status of the resource. Valid values: CHANGE_FAILED, CHANGE_INIT, EXCEPTION, FAILED, INIT, SUCCESS.
    ids List<String>
    A list of Endpoint IDs.
    nameRegex String
    A regex string to filter results by Endpoint name.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    status String
    The status of the resource. Valid values: CHANGE_FAILED, CHANGE_INIT, EXCEPTION, FAILED, INIT, SUCCESS.

    getEndpoints Result

    The following output properties are available:

    Endpoints List<Pulumi.AliCloud.Pvtz.Outputs.GetEndpointsEndpoint>
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    Names List<string>
    NameRegex string
    OutputFile string
    Status string
    Endpoints []GetEndpointsEndpoint
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    Names []string
    NameRegex string
    OutputFile string
    Status string
    endpoints List<GetEndpointsEndpoint>
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    names List<String>
    nameRegex String
    outputFile String
    status String
    endpoints GetEndpointsEndpoint[]
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    names string[]
    nameRegex string
    outputFile string
    status string
    endpoints Sequence[GetEndpointsEndpoint]
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    names Sequence[str]
    name_regex str
    output_file str
    status str
    endpoints List<Property Map>
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    names List<String>
    nameRegex String
    outputFile String
    status String

    Supporting Types

    GetEndpointsEndpoint

    CreateTime string
    The creation time of the resource.
    EndpointName string
    The name of the resource.
    Id string
    IpConfigs List<Pulumi.AliCloud.Pvtz.Inputs.GetEndpointsEndpointIpConfig>
    The Ip Configs.
    SecurityGroupId string
    The ID of the Security Group.
    Status string
    The status of the resource. Valid values: CHANGE_FAILED, CHANGE_INIT, EXCEPTION, FAILED, INIT, SUCCESS.
    VpcId string
    The VPC ID.
    VpcName string
    The name of the VPC.
    VpcRegionId string
    The Region of the VPC.
    CreateTime string
    The creation time of the resource.
    EndpointName string
    The name of the resource.
    Id string
    IpConfigs []GetEndpointsEndpointIpConfig
    The Ip Configs.
    SecurityGroupId string
    The ID of the Security Group.
    Status string
    The status of the resource. Valid values: CHANGE_FAILED, CHANGE_INIT, EXCEPTION, FAILED, INIT, SUCCESS.
    VpcId string
    The VPC ID.
    VpcName string
    The name of the VPC.
    VpcRegionId string
    The Region of the VPC.
    createTime String
    The creation time of the resource.
    endpointName String
    The name of the resource.
    id String
    ipConfigs List<GetEndpointsEndpointIpConfig>
    The Ip Configs.
    securityGroupId String
    The ID of the Security Group.
    status String
    The status of the resource. Valid values: CHANGE_FAILED, CHANGE_INIT, EXCEPTION, FAILED, INIT, SUCCESS.
    vpcId String
    The VPC ID.
    vpcName String
    The name of the VPC.
    vpcRegionId String
    The Region of the VPC.
    createTime string
    The creation time of the resource.
    endpointName string
    The name of the resource.
    id string
    ipConfigs GetEndpointsEndpointIpConfig[]
    The Ip Configs.
    securityGroupId string
    The ID of the Security Group.
    status string
    The status of the resource. Valid values: CHANGE_FAILED, CHANGE_INIT, EXCEPTION, FAILED, INIT, SUCCESS.
    vpcId string
    The VPC ID.
    vpcName string
    The name of the VPC.
    vpcRegionId string
    The Region of the VPC.
    create_time str
    The creation time of the resource.
    endpoint_name str
    The name of the resource.
    id str
    ip_configs Sequence[GetEndpointsEndpointIpConfig]
    The Ip Configs.
    security_group_id str
    The ID of the Security Group.
    status str
    The status of the resource. Valid values: CHANGE_FAILED, CHANGE_INIT, EXCEPTION, FAILED, INIT, SUCCESS.
    vpc_id str
    The VPC ID.
    vpc_name str
    The name of the VPC.
    vpc_region_id str
    The Region of the VPC.
    createTime String
    The creation time of the resource.
    endpointName String
    The name of the resource.
    id String
    ipConfigs List<Property Map>
    The Ip Configs.
    securityGroupId String
    The ID of the Security Group.
    status String
    The status of the resource. Valid values: CHANGE_FAILED, CHANGE_INIT, EXCEPTION, FAILED, INIT, SUCCESS.
    vpcId String
    The VPC ID.
    vpcName String
    The name of the VPC.
    vpcRegionId String
    The Region of the VPC.

    GetEndpointsEndpointIpConfig

    CidrBlock string
    The Subnet mask.
    Ip string
    The IP address within the parameter range of the subnet mask. NOTE: It is recommended to use the IP address assigned by the system.
    VswitchId string
    The Vswitch id.
    ZoneId string
    The Zone ID.
    CidrBlock string
    The Subnet mask.
    Ip string
    The IP address within the parameter range of the subnet mask. NOTE: It is recommended to use the IP address assigned by the system.
    VswitchId string
    The Vswitch id.
    ZoneId string
    The Zone ID.
    cidrBlock String
    The Subnet mask.
    ip String
    The IP address within the parameter range of the subnet mask. NOTE: It is recommended to use the IP address assigned by the system.
    vswitchId String
    The Vswitch id.
    zoneId String
    The Zone ID.
    cidrBlock string
    The Subnet mask.
    ip string
    The IP address within the parameter range of the subnet mask. NOTE: It is recommended to use the IP address assigned by the system.
    vswitchId string
    The Vswitch id.
    zoneId string
    The Zone ID.
    cidr_block str
    The Subnet mask.
    ip str
    The IP address within the parameter range of the subnet mask. NOTE: It is recommended to use the IP address assigned by the system.
    vswitch_id str
    The Vswitch id.
    zone_id str
    The Zone ID.
    cidrBlock String
    The Subnet mask.
    ip String
    The IP address within the parameter range of the subnet mask. NOTE: It is recommended to use the IP address assigned by the system.
    vswitchId String
    The Vswitch id.
    zoneId String
    The Zone ID.

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi