1. Packages
  2. Cloudflare Provider
  3. API Docs
  4. getInfrastructureAccessTargets
Cloudflare v5.43.0 published on Wednesday, Nov 13, 2024 by Pulumi

cloudflare.getInfrastructureAccessTargets

Explore with Pulumi AI

cloudflare logo
Cloudflare v5.43.0 published on Wednesday, Nov 13, 2024 by Pulumi

    Use this data source to retrieve all Infrastructure Access Targets.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudflare from "@pulumi/cloudflare";
    
    const example = cloudflare.getInfrastructureAccessTargets({
        accountId: "f037e56e89293a057740de681ac9abbe",
        hostnameContains: "example",
        ipv4: "198.51.100.1",
    });
    export const targets = example.then(example => example.targets);
    
    import pulumi
    import pulumi_cloudflare as cloudflare
    
    example = cloudflare.get_infrastructure_access_targets(account_id="f037e56e89293a057740de681ac9abbe",
        hostname_contains="example",
        ipv4="198.51.100.1")
    pulumi.export("targets", example.targets)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-cloudflare/sdk/v5/go/cloudflare"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := cloudflare.GetInfrastructureAccessTargets(ctx, &cloudflare.GetInfrastructureAccessTargetsArgs{
    			AccountId:        "f037e56e89293a057740de681ac9abbe",
    			HostnameContains: pulumi.StringRef("example"),
    			Ipv4:             pulumi.StringRef("198.51.100.1"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("targets", example.Targets)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Cloudflare = Pulumi.Cloudflare;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Cloudflare.GetInfrastructureAccessTargets.Invoke(new()
        {
            AccountId = "f037e56e89293a057740de681ac9abbe",
            HostnameContains = "example",
            Ipv4 = "198.51.100.1",
        });
    
        return new Dictionary<string, object?>
        {
            ["targets"] = example.Apply(getInfrastructureAccessTargetsResult => getInfrastructureAccessTargetsResult.Targets),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cloudflare.CloudflareFunctions;
    import com.pulumi.cloudflare.inputs.GetInfrastructureAccessTargetsArgs;
    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 = CloudflareFunctions.getInfrastructureAccessTargets(GetInfrastructureAccessTargetsArgs.builder()
                .accountId("f037e56e89293a057740de681ac9abbe")
                .hostnameContains("example")
                .ipv4("198.51.100.1")
                .build());
    
            ctx.export("targets", example.applyValue(getInfrastructureAccessTargetsResult -> getInfrastructureAccessTargetsResult.targets()));
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: cloudflare:getInfrastructureAccessTargets
          Arguments:
            accountId: f037e56e89293a057740de681ac9abbe
            hostnameContains: example
            ipv4: 198.51.100.1
    outputs:
      # output the list of targets the data source contains
      targets: ${example.targets}
    

    Using getInfrastructureAccessTargets

    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 getInfrastructureAccessTargets(args: GetInfrastructureAccessTargetsArgs, opts?: InvokeOptions): Promise<GetInfrastructureAccessTargetsResult>
    function getInfrastructureAccessTargetsOutput(args: GetInfrastructureAccessTargetsOutputArgs, opts?: InvokeOptions): Output<GetInfrastructureAccessTargetsResult>
    def get_infrastructure_access_targets(account_id: Optional[str] = None,
                                          created_after: Optional[str] = None,
                                          hostname: Optional[str] = None,
                                          hostname_contains: Optional[str] = None,
                                          ipv4: Optional[str] = None,
                                          ipv6: Optional[str] = None,
                                          modified_after: Optional[str] = None,
                                          virtual_network_id: Optional[str] = None,
                                          opts: Optional[InvokeOptions] = None) -> GetInfrastructureAccessTargetsResult
    def get_infrastructure_access_targets_output(account_id: Optional[pulumi.Input[str]] = None,
                                          created_after: Optional[pulumi.Input[str]] = None,
                                          hostname: Optional[pulumi.Input[str]] = None,
                                          hostname_contains: Optional[pulumi.Input[str]] = None,
                                          ipv4: Optional[pulumi.Input[str]] = None,
                                          ipv6: Optional[pulumi.Input[str]] = None,
                                          modified_after: Optional[pulumi.Input[str]] = None,
                                          virtual_network_id: Optional[pulumi.Input[str]] = None,
                                          opts: Optional[InvokeOptions] = None) -> Output[GetInfrastructureAccessTargetsResult]
    func GetInfrastructureAccessTargets(ctx *Context, args *GetInfrastructureAccessTargetsArgs, opts ...InvokeOption) (*GetInfrastructureAccessTargetsResult, error)
    func GetInfrastructureAccessTargetsOutput(ctx *Context, args *GetInfrastructureAccessTargetsOutputArgs, opts ...InvokeOption) GetInfrastructureAccessTargetsResultOutput

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

    public static class GetInfrastructureAccessTargets 
    {
        public static Task<GetInfrastructureAccessTargetsResult> InvokeAsync(GetInfrastructureAccessTargetsArgs args, InvokeOptions? opts = null)
        public static Output<GetInfrastructureAccessTargetsResult> Invoke(GetInfrastructureAccessTargetsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetInfrastructureAccessTargetsResult> getInfrastructureAccessTargets(GetInfrastructureAccessTargetsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: cloudflare:index/getInfrastructureAccessTargets:getInfrastructureAccessTargets
      arguments:
        # arguments dictionary

    The following arguments are supported:

    AccountId string
    The account identifier to target for the resource.
    CreatedAfter string
    A date and time after a target was created to filter on.
    Hostname string
    The hostname of the target.
    HostnameContains string
    Partial match to the hostname of a target
    Ipv4 string
    The target's IPv4 address.
    Ipv6 string
    The target's IPv6 address.
    ModifiedAfter string
    A date and time after a target was modified to filter on.
    VirtualNetworkId string
    The private virtual network identifier for the target.
    AccountId string
    The account identifier to target for the resource.
    CreatedAfter string
    A date and time after a target was created to filter on.
    Hostname string
    The hostname of the target.
    HostnameContains string
    Partial match to the hostname of a target
    Ipv4 string
    The target's IPv4 address.
    Ipv6 string
    The target's IPv6 address.
    ModifiedAfter string
    A date and time after a target was modified to filter on.
    VirtualNetworkId string
    The private virtual network identifier for the target.
    accountId String
    The account identifier to target for the resource.
    createdAfter String
    A date and time after a target was created to filter on.
    hostname String
    The hostname of the target.
    hostnameContains String
    Partial match to the hostname of a target
    ipv4 String
    The target's IPv4 address.
    ipv6 String
    The target's IPv6 address.
    modifiedAfter String
    A date and time after a target was modified to filter on.
    virtualNetworkId String
    The private virtual network identifier for the target.
    accountId string
    The account identifier to target for the resource.
    createdAfter string
    A date and time after a target was created to filter on.
    hostname string
    The hostname of the target.
    hostnameContains string
    Partial match to the hostname of a target
    ipv4 string
    The target's IPv4 address.
    ipv6 string
    The target's IPv6 address.
    modifiedAfter string
    A date and time after a target was modified to filter on.
    virtualNetworkId string
    The private virtual network identifier for the target.
    account_id str
    The account identifier to target for the resource.
    created_after str
    A date and time after a target was created to filter on.
    hostname str
    The hostname of the target.
    hostname_contains str
    Partial match to the hostname of a target
    ipv4 str
    The target's IPv4 address.
    ipv6 str
    The target's IPv6 address.
    modified_after str
    A date and time after a target was modified to filter on.
    virtual_network_id str
    The private virtual network identifier for the target.
    accountId String
    The account identifier to target for the resource.
    createdAfter String
    A date and time after a target was created to filter on.
    hostname String
    The hostname of the target.
    hostnameContains String
    Partial match to the hostname of a target
    ipv4 String
    The target's IPv4 address.
    ipv6 String
    The target's IPv6 address.
    modifiedAfter String
    A date and time after a target was modified to filter on.
    virtualNetworkId String
    The private virtual network identifier for the target.

    getInfrastructureAccessTargets Result

    The following output properties are available:

    AccountId string
    The account identifier to target for the resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    Targets List<GetInfrastructureAccessTargetsTarget>
    CreatedAfter string
    A date and time after a target was created to filter on.
    Hostname string
    The hostname of the target.
    HostnameContains string
    Partial match to the hostname of a target
    Ipv4 string
    The target's IPv4 address.
    Ipv6 string
    The target's IPv6 address.
    ModifiedAfter string
    A date and time after a target was modified to filter on.
    VirtualNetworkId string
    The private virtual network identifier for the target.
    AccountId string
    The account identifier to target for the resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    Targets []GetInfrastructureAccessTargetsTarget
    CreatedAfter string
    A date and time after a target was created to filter on.
    Hostname string
    The hostname of the target.
    HostnameContains string
    Partial match to the hostname of a target
    Ipv4 string
    The target's IPv4 address.
    Ipv6 string
    The target's IPv6 address.
    ModifiedAfter string
    A date and time after a target was modified to filter on.
    VirtualNetworkId string
    The private virtual network identifier for the target.
    accountId String
    The account identifier to target for the resource.
    id String
    The provider-assigned unique ID for this managed resource.
    targets List<GetInfrastructureAccessTargetsTarget>
    createdAfter String
    A date and time after a target was created to filter on.
    hostname String
    The hostname of the target.
    hostnameContains String
    Partial match to the hostname of a target
    ipv4 String
    The target's IPv4 address.
    ipv6 String
    The target's IPv6 address.
    modifiedAfter String
    A date and time after a target was modified to filter on.
    virtualNetworkId String
    The private virtual network identifier for the target.
    accountId string
    The account identifier to target for the resource.
    id string
    The provider-assigned unique ID for this managed resource.
    targets GetInfrastructureAccessTargetsTarget[]
    createdAfter string
    A date and time after a target was created to filter on.
    hostname string
    The hostname of the target.
    hostnameContains string
    Partial match to the hostname of a target
    ipv4 string
    The target's IPv4 address.
    ipv6 string
    The target's IPv6 address.
    modifiedAfter string
    A date and time after a target was modified to filter on.
    virtualNetworkId string
    The private virtual network identifier for the target.
    account_id str
    The account identifier to target for the resource.
    id str
    The provider-assigned unique ID for this managed resource.
    targets Sequence[GetInfrastructureAccessTargetsTarget]
    created_after str
    A date and time after a target was created to filter on.
    hostname str
    The hostname of the target.
    hostname_contains str
    Partial match to the hostname of a target
    ipv4 str
    The target's IPv4 address.
    ipv6 str
    The target's IPv6 address.
    modified_after str
    A date and time after a target was modified to filter on.
    virtual_network_id str
    The private virtual network identifier for the target.
    accountId String
    The account identifier to target for the resource.
    id String
    The provider-assigned unique ID for this managed resource.
    targets List<Property Map>
    createdAfter String
    A date and time after a target was created to filter on.
    hostname String
    The hostname of the target.
    hostnameContains String
    Partial match to the hostname of a target
    ipv4 String
    The target's IPv4 address.
    ipv6 String
    The target's IPv6 address.
    modifiedAfter String
    A date and time after a target was modified to filter on.
    virtualNetworkId String
    The private virtual network identifier for the target.

    Supporting Types

    GetInfrastructureAccessTargetsTarget

    AccountId string
    The account identifier to target for the resource.
    CreatedAt string
    The date and time at which the target was created.
    Hostname string
    A non-unique field that refers to a target.
    Id string
    The identifier of this resource. This is target's unique identifier.
    Ip GetInfrastructureAccessTargetsTargetIp
    The IPv4/IPv6 address that identifies where to reach a target.
    ModifiedAt string
    The date and time at which the target was last modified.
    AccountId string
    The account identifier to target for the resource.
    CreatedAt string
    The date and time at which the target was created.
    Hostname string
    A non-unique field that refers to a target.
    Id string
    The identifier of this resource. This is target's unique identifier.
    Ip GetInfrastructureAccessTargetsTargetIp
    The IPv4/IPv6 address that identifies where to reach a target.
    ModifiedAt string
    The date and time at which the target was last modified.
    accountId String
    The account identifier to target for the resource.
    createdAt String
    The date and time at which the target was created.
    hostname String
    A non-unique field that refers to a target.
    id String
    The identifier of this resource. This is target's unique identifier.
    ip GetInfrastructureAccessTargetsTargetIp
    The IPv4/IPv6 address that identifies where to reach a target.
    modifiedAt String
    The date and time at which the target was last modified.
    accountId string
    The account identifier to target for the resource.
    createdAt string
    The date and time at which the target was created.
    hostname string
    A non-unique field that refers to a target.
    id string
    The identifier of this resource. This is target's unique identifier.
    ip GetInfrastructureAccessTargetsTargetIp
    The IPv4/IPv6 address that identifies where to reach a target.
    modifiedAt string
    The date and time at which the target was last modified.
    account_id str
    The account identifier to target for the resource.
    created_at str
    The date and time at which the target was created.
    hostname str
    A non-unique field that refers to a target.
    id str
    The identifier of this resource. This is target's unique identifier.
    ip GetInfrastructureAccessTargetsTargetIp
    The IPv4/IPv6 address that identifies where to reach a target.
    modified_at str
    The date and time at which the target was last modified.
    accountId String
    The account identifier to target for the resource.
    createdAt String
    The date and time at which the target was created.
    hostname String
    A non-unique field that refers to a target.
    id String
    The identifier of this resource. This is target's unique identifier.
    ip Property Map
    The IPv4/IPv6 address that identifies where to reach a target.
    modifiedAt String
    The date and time at which the target was last modified.

    GetInfrastructureAccessTargetsTargetIp

    ipv4 Property Map
    The target's IPv4 address.
    ipv6 Property Map
    The target's IPv6 address.

    GetInfrastructureAccessTargetsTargetIpIpv4

    IpAddr string
    The IP address of the target.
    VirtualNetworkId string
    The private virtual network identifier for the target.
    IpAddr string
    The IP address of the target.
    VirtualNetworkId string
    The private virtual network identifier for the target.
    ipAddr String
    The IP address of the target.
    virtualNetworkId String
    The private virtual network identifier for the target.
    ipAddr string
    The IP address of the target.
    virtualNetworkId string
    The private virtual network identifier for the target.
    ip_addr str
    The IP address of the target.
    virtual_network_id str
    The private virtual network identifier for the target.
    ipAddr String
    The IP address of the target.
    virtualNetworkId String
    The private virtual network identifier for the target.

    GetInfrastructureAccessTargetsTargetIpIpv6

    IpAddr string
    The IP address of the target.
    VirtualNetworkId string
    The private virtual network identifier for the target.
    IpAddr string
    The IP address of the target.
    VirtualNetworkId string
    The private virtual network identifier for the target.
    ipAddr String
    The IP address of the target.
    virtualNetworkId String
    The private virtual network identifier for the target.
    ipAddr string
    The IP address of the target.
    virtualNetworkId string
    The private virtual network identifier for the target.
    ip_addr str
    The IP address of the target.
    virtual_network_id str
    The private virtual network identifier for the target.
    ipAddr String
    The IP address of the target.
    virtualNetworkId String
    The private virtual network identifier for the target.

    Package Details

    Repository
    Cloudflare pulumi/pulumi-cloudflare
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the cloudflare Terraform Provider.
    cloudflare logo
    Cloudflare v5.43.0 published on Wednesday, Nov 13, 2024 by Pulumi