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

alicloud.cdn.getIpInfo

Explore with Pulumi AI

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

    This data source provides the function of verifying whether an IP is a CDN node.

    NOTE: Available in v1.153.0+.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const ipTest = alicloud.cdn.getIpInfo({
        ip: "114.114.114.114",
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    ip_test = alicloud.cdn.get_ip_info(ip="114.114.114.114")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cdn"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := cdn.GetIpInfo(ctx, &cdn.GetIpInfoArgs{
    			Ip: "114.114.114.114",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var ipTest = AliCloud.Cdn.GetIpInfo.Invoke(new()
        {
            Ip = "114.114.114.114",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.cdn.CdnFunctions;
    import com.pulumi.alicloud.cdn.inputs.GetIpInfoArgs;
    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 ipTest = CdnFunctions.getIpInfo(GetIpInfoArgs.builder()
                .ip("114.114.114.114")
                .build());
    
        }
    }
    
    variables:
      ipTest:
        fn::invoke:
          Function: alicloud:cdn:getIpInfo
          Arguments:
            ip: 114.114.114.114
    

    Using getIpInfo

    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 getIpInfo(args: GetIpInfoArgs, opts?: InvokeOptions): Promise<GetIpInfoResult>
    function getIpInfoOutput(args: GetIpInfoOutputArgs, opts?: InvokeOptions): Output<GetIpInfoResult>
    def get_ip_info(ip: Optional[str] = None,
                    opts: Optional[InvokeOptions] = None) -> GetIpInfoResult
    def get_ip_info_output(ip: Optional[pulumi.Input[str]] = None,
                    opts: Optional[InvokeOptions] = None) -> Output[GetIpInfoResult]
    func GetIpInfo(ctx *Context, args *GetIpInfoArgs, opts ...InvokeOption) (*GetIpInfoResult, error)
    func GetIpInfoOutput(ctx *Context, args *GetIpInfoOutputArgs, opts ...InvokeOption) GetIpInfoResultOutput

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

    public static class GetIpInfo 
    {
        public static Task<GetIpInfoResult> InvokeAsync(GetIpInfoArgs args, InvokeOptions? opts = null)
        public static Output<GetIpInfoResult> Invoke(GetIpInfoInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetIpInfoResult> getIpInfo(GetIpInfoArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:cdn/getIpInfo:getIpInfo
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Ip string
    Specify IP address.
    Ip string
    Specify IP address.
    ip String
    Specify IP address.
    ip string
    Specify IP address.
    ip str
    Specify IP address.
    ip String
    Specify IP address.

    getIpInfo Result

    The following output properties are available:

    CdnIp string
    Id string
    The provider-assigned unique ID for this managed resource.
    Ip string
    Isp string
    IspEname string
    Region string
    RegionEname string
    CdnIp string
    Id string
    The provider-assigned unique ID for this managed resource.
    Ip string
    Isp string
    IspEname string
    Region string
    RegionEname string
    cdnIp String
    id String
    The provider-assigned unique ID for this managed resource.
    ip String
    isp String
    ispEname String
    region String
    regionEname String
    cdnIp string
    id string
    The provider-assigned unique ID for this managed resource.
    ip string
    isp string
    ispEname string
    region string
    regionEname string
    cdn_ip str
    id str
    The provider-assigned unique ID for this managed resource.
    ip str
    isp str
    isp_ename str
    region str
    region_ename str
    cdnIp String
    id String
    The provider-assigned unique ID for this managed resource.
    ip String
    isp String
    ispEname String
    region String
    regionEname String

    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