Google Cloud Classic v8.9.3 published on Monday, Nov 18, 2024 by Pulumi
gcp.datastream.getStaticIps
Explore with Pulumi AI
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/v8/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:
getStaticIps Result
The following output properties are available:
- 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
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.