1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. datastream
  5. getStaticIps
Google Cloud Classic v7.29.0 published on Wednesday, Jun 26, 2024 by Pulumi

gcp.datastream.getStaticIps

Explore with Pulumi AI

gcp logo
Google Cloud Classic v7.29.0 published on Wednesday, Jun 26, 2024 by Pulumi

    Returns the list of IP addresses that Datastream connects from. For more information see the official documentation.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const datastreamIps = gcp.datastream.getStaticIps({
        location: "us-west1",
        project: "my-project",
    });
    export const ipList = datastreamIps.then(datastreamIps => datastreamIps.staticIps);
    
    import pulumi
    import pulumi_gcp as gcp
    
    datastream_ips = gcp.datastream.get_static_ips(location="us-west1",
        project="my-project")
    pulumi.export("ipList", datastream_ips.static_ips)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/datastream"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		datastreamIps, err := datastream.GetStaticIps(ctx, &datastream.GetStaticIpsArgs{
    			Location: "us-west1",
    			Project:  pulumi.StringRef("my-project"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("ipList", datastreamIps.StaticIps)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var datastreamIps = Gcp.Datastream.GetStaticIps.Invoke(new()
        {
            Location = "us-west1",
            Project = "my-project",
        });
    
        return new Dictionary<string, object?>
        {
            ["ipList"] = datastreamIps.Apply(getStaticIpsResult => getStaticIpsResult.StaticIps),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.datastream.DatastreamFunctions;
    import com.pulumi.gcp.datastream.inputs.GetStaticIpsArgs;
    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 datastreamIps = DatastreamFunctions.getStaticIps(GetStaticIpsArgs.builder()
                .location("us-west1")
                .project("my-project")
                .build());
    
            ctx.export("ipList", datastreamIps.applyValue(getStaticIpsResult -> getStaticIpsResult.staticIps()));
        }
    }
    
    variables:
      datastreamIps:
        fn::invoke:
          Function: gcp:datastream:getStaticIps
          Arguments:
            location: us-west1
            project: my-project
    outputs:
      ipList: ${datastreamIps.staticIps}
    

    Using getStaticIps

    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 getStaticIps(args: GetStaticIpsArgs, opts?: InvokeOptions): Promise<GetStaticIpsResult>
    function getStaticIpsOutput(args: GetStaticIpsOutputArgs, opts?: InvokeOptions): Output<GetStaticIpsResult>
    def get_static_ips(location: Optional[str] = None,
                       project: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetStaticIpsResult
    def get_static_ips_output(location: Optional[pulumi.Input[str]] = None,
                       project: Optional[pulumi.Input[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetStaticIpsResult]
    func GetStaticIps(ctx *Context, args *GetStaticIpsArgs, opts ...InvokeOption) (*GetStaticIpsResult, error)
    func GetStaticIpsOutput(ctx *Context, args *GetStaticIpsOutputArgs, opts ...InvokeOption) GetStaticIpsResultOutput

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

    public static class GetStaticIps 
    {
        public static Task<GetStaticIpsResult> InvokeAsync(GetStaticIpsArgs args, InvokeOptions? opts = null)
        public static Output<GetStaticIpsResult> Invoke(GetStaticIpsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetStaticIpsResult> getStaticIps(GetStaticIpsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: gcp:datastream/getStaticIps:getStaticIps
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Location string
    The location to list Datastream IPs for. For example: us-east1.
    Project string
    Project from which to list static IP addresses. Defaults to project declared in the provider.
    Location string
    The location to list Datastream IPs for. For example: us-east1.
    Project string
    Project from which to list static IP addresses. Defaults to project declared in the provider.
    location String
    The location to list Datastream IPs for. For example: us-east1.
    project String
    Project from which to list static IP addresses. Defaults to project declared in the provider.
    location string
    The location to list Datastream IPs for. For example: us-east1.
    project string
    Project from which to list static IP addresses. Defaults to project declared in the provider.
    location str
    The location to list Datastream IPs for. For example: us-east1.
    project str
    Project from which to list static IP addresses. Defaults to project declared in the provider.
    location String
    The location to list Datastream IPs for. For example: us-east1.
    project String
    Project from which to list static IP addresses. Defaults to project declared in the provider.

    getStaticIps Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Location string
    StaticIps List<string>
    A list of static IP addresses that Datastream will connect from.
    Project string
    Id string
    The provider-assigned unique ID for this managed resource.
    Location string
    StaticIps []string
    A list of static IP addresses that Datastream will connect from.
    Project string
    id String
    The provider-assigned unique ID for this managed resource.
    location String
    staticIps List<String>
    A list of static IP addresses that Datastream will connect from.
    project String
    id string
    The provider-assigned unique ID for this managed resource.
    location string
    staticIps string[]
    A list of static IP addresses that Datastream will connect from.
    project string
    id str
    The provider-assigned unique ID for this managed resource.
    location str
    static_ips Sequence[str]
    A list of static IP addresses that Datastream will connect from.
    project str
    id String
    The provider-assigned unique ID for this managed resource.
    location String
    staticIps List<String>
    A list of static IP addresses that Datastream will connect from.
    project String

    Package Details

    Repository
    Google Cloud (GCP) Classic pulumi/pulumi-gcp
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the google-beta Terraform Provider.
    gcp logo
    Google Cloud Classic v7.29.0 published on Wednesday, Jun 26, 2024 by Pulumi