aquasec logo
Aquasec v0.8.22, Feb 26 23

aquasec.getGateways

The data source aquasec.getGateways provides a method to query all gateways within the Aqua

Example Usage

using System.Collections.Generic;
using Pulumi;
using Aquasec = Pulumi.Aquasec;

return await Deployment.RunAsync(() => 
{
    var testgateway = Aquasec.GetGateways.Invoke();

    return new Dictionary<string, object?>
    {
        ["gatewayData"] = testgateway,
        ["gatewayName"] = testgateway.Apply(getGatewaysResult => getGatewaysResult.Gateways[0]?.Id),
        ["gatewayStatus"] = testgateway.Apply(getGatewaysResult => getGatewaysResult.Gateways[0]?.Status),
        ["gatewayDescription"] = testgateway.Apply(getGatewaysResult => getGatewaysResult.Gateways[0]?.Description),
        ["gatewayVersion"] = testgateway.Apply(getGatewaysResult => getGatewaysResult.Gateways[0]?.Version),
        ["gatewayHostname"] = testgateway.Apply(getGatewaysResult => getGatewaysResult.Gateways[0]?.Hostname),
        ["gatewayGrpcAddress"] = testgateway.Apply(getGatewaysResult => getGatewaysResult.Gateways[0]?.GrpcAddress),
    };
});
package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumiverse/pulumi-aquasec/sdk/go/aquasec"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		testgateway, err := aquasec.GetGateways(ctx, nil, nil)
		if err != nil {
			return err
		}
		ctx.Export("gatewayData", testgateway)
		ctx.Export("gatewayName", testgateway.Gateways[0].Id)
		ctx.Export("gatewayStatus", testgateway.Gateways[0].Status)
		ctx.Export("gatewayDescription", testgateway.Gateways[0].Description)
		ctx.Export("gatewayVersion", testgateway.Gateways[0].Version)
		ctx.Export("gatewayHostname", testgateway.Gateways[0].Hostname)
		ctx.Export("gatewayGrpcAddress", testgateway.Gateways[0].GrpcAddress)
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aquasec.AquasecFunctions;
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 testgateway = AquasecFunctions.getGateways();

        ctx.export("gatewayData", testgateway.applyValue(getGatewaysResult -> getGatewaysResult));
        ctx.export("gatewayName", testgateway.applyValue(getGatewaysResult -> getGatewaysResult.gateways()[0].id()));
        ctx.export("gatewayStatus", testgateway.applyValue(getGatewaysResult -> getGatewaysResult.gateways()[0].status()));
        ctx.export("gatewayDescription", testgateway.applyValue(getGatewaysResult -> getGatewaysResult.gateways()[0].description()));
        ctx.export("gatewayVersion", testgateway.applyValue(getGatewaysResult -> getGatewaysResult.gateways()[0].version()));
        ctx.export("gatewayHostname", testgateway.applyValue(getGatewaysResult -> getGatewaysResult.gateways()[0].hostname()));
        ctx.export("gatewayGrpcAddress", testgateway.applyValue(getGatewaysResult -> getGatewaysResult.gateways()[0].grpcAddress()));
    }
}
import pulumi
import pulumi_aquasec as aquasec

testgateway = aquasec.get_gateways()
pulumi.export("gatewayData", testgateway)
pulumi.export("gatewayName", testgateway.gateways[0].id)
pulumi.export("gatewayStatus", testgateway.gateways[0].status)
pulumi.export("gatewayDescription", testgateway.gateways[0].description)
pulumi.export("gatewayVersion", testgateway.gateways[0].version)
pulumi.export("gatewayHostname", testgateway.gateways[0].hostname)
pulumi.export("gatewayGrpcAddress", testgateway.gateways[0].grpc_address)
import * as pulumi from "@pulumi/pulumi";
import * as aquasec from "@pulumi/aquasec";

const testgateway = aquasec.getGateways({});
export const gatewayData = testgateway;
export const gatewayName = testgateway.then(testgateway => testgateway.gateways?.[0]?.id);
export const gatewayStatus = testgateway.then(testgateway => testgateway.gateways?.[0]?.status);
export const gatewayDescription = testgateway.then(testgateway => testgateway.gateways?.[0]?.description);
export const gatewayVersion = testgateway.then(testgateway => testgateway.gateways?.[0]?.version);
export const gatewayHostname = testgateway.then(testgateway => testgateway.gateways?.[0]?.hostname);
export const gatewayGrpcAddress = testgateway.then(testgateway => testgateway.gateways?.[0]?.grpcAddress);
variables:
  testgateway:
    fn::invoke:
      Function: aquasec:getGateways
      Arguments: {}
outputs:
  gatewayData: ${testgateway}
  gatewayName: ${testgateway.gateways[0].id}
  gatewayStatus: ${testgateway.gateways[0].status}
  gatewayDescription: ${testgateway.gateways[0].description}
  gatewayVersion: ${testgateway.gateways[0].version}
  gatewayHostname: ${testgateway.gateways[0].hostname}
  gatewayGrpcAddress: ${testgateway.gateways[0].grpcAddress}

Using getGateways

function getGateways(opts?: InvokeOptions): Promise<GetGatewaysResult>
def get_gateways(opts: Optional[InvokeOptions] = None) -> GetGatewaysResult
func GetGateways(ctx *Context, opts ...InvokeOption) (*GetGatewaysResult, error)

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

public static class GetGateways 
{
    public static Task<GetGatewaysResult> InvokeAsync(InvokeOptions? opts = null)
}
public static CompletableFuture<GetGatewaysResult> getGateways(InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: aquasec:index/getGateways:getGateways
  arguments:
    # arguments dictionary

getGateways Result

The following output properties are available:

Gateways List<Pulumiverse.Aquasec.Outputs.GetGatewaysGateway>

A list of existing gateways' parameters.

Id string

The provider-assigned unique ID for this managed resource.

Gateways []GetGatewaysGateway

A list of existing gateways' parameters.

Id string

The provider-assigned unique ID for this managed resource.

gateways List<GetGatewaysGateway>

A list of existing gateways' parameters.

id String

The provider-assigned unique ID for this managed resource.

gateways GetGatewaysGateway[]

A list of existing gateways' parameters.

id string

The provider-assigned unique ID for this managed resource.

gateways Sequence[GetGatewaysGateway]

A list of existing gateways' parameters.

id str

The provider-assigned unique ID for this managed resource.

gateways List<Property Map>

A list of existing gateways' parameters.

id String

The provider-assigned unique ID for this managed resource.

Supporting Types

GetGatewaysGateway

Description string
GrpcAddress string
Hostname string
Id string

The ID of this resource.

Logicalname string
PublicAddress string
Status string
Version string
Description string
GrpcAddress string
Hostname string
Id string

The ID of this resource.

Logicalname string
PublicAddress string
Status string
Version string
description String
grpcAddress String
hostname String
id String

The ID of this resource.

logicalname String
publicAddress String
status String
version String
description string
grpcAddress string
hostname string
id string

The ID of this resource.

logicalname string
publicAddress string
status string
version string
description str
grpc_address str
hostname str
id str

The ID of this resource.

logicalname str
public_address str
status str
version str
description String
grpcAddress String
hostname String
id String

The ID of this resource.

logicalname String
publicAddress String
status String
version String

Package Details

Repository
aquasec pulumiverse/pulumi-aquasec
License
Apache-2.0
Notes

This Pulumi package is based on the aquasec Terraform Provider.