1. Packages
  2. Aquasec
  3. API Docs
  4. getGateways
Aquasec v0.8.29 published on Monday, Jul 22, 2024 by Pulumiverse

aquasec.getGateways

Explore with Pulumi AI

Aquasec v0.8.29 published on Monday, Jul 22, 2024 by Pulumiverse

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

Example Usage

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);
Copy
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)
Copy
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
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
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),
    };
});
Copy
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()));
    }
}
Copy
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}
Copy

Using getGateways

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 getGateways(opts?: InvokeOptions): Promise<GetGatewaysResult>
function getGatewaysOutput(opts?: InvokeOptions): Output<GetGatewaysResult>
Copy
def get_gateways(opts: Optional[InvokeOptions] = None) -> GetGatewaysResult
def get_gateways_output(opts: Optional[InvokeOptions] = None) -> Output[GetGatewaysResult]
Copy
func GetGateways(ctx *Context, opts ...InvokeOption) (*GetGatewaysResult, error)
func GetGatewaysOutput(ctx *Context, opts ...InvokeOption) GetGatewaysResultOutput
Copy

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

public static class GetGateways 
{
    public static Task<GetGatewaysResult> InvokeAsync(InvokeOptions? opts = null)
    public static Output<GetGatewaysResult> Invoke(InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetGatewaysResult> getGateways(InvokeOptions options)
public static Output<GetGatewaysResult> getGateways(InvokeOptions options)
Copy
fn::invoke:
  function: aquasec:index/getGateways:getGateways
  arguments:
    # arguments dictionary
Copy

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 This property is required. string
The description of the gateway.
GrpcAddress This property is required. string
The GRPC address of the gateway.
Hostname This property is required. string
The name of the gateway's host.
Id This property is required. string
The ID of the gateway (for example: 8522744b25e2_gateway)
Logicalname This property is required. string
The logical name of the gateway (for example: 8522744b25e2)
PublicAddress This property is required. string
The public IP address of the gateway.
Status This property is required. string
The status of the gateway.
Version This property is required. string
The version of the gateway.
Description This property is required. string
The description of the gateway.
GrpcAddress This property is required. string
The GRPC address of the gateway.
Hostname This property is required. string
The name of the gateway's host.
Id This property is required. string
The ID of the gateway (for example: 8522744b25e2_gateway)
Logicalname This property is required. string
The logical name of the gateway (for example: 8522744b25e2)
PublicAddress This property is required. string
The public IP address of the gateway.
Status This property is required. string
The status of the gateway.
Version This property is required. string
The version of the gateway.
description This property is required. String
The description of the gateway.
grpcAddress This property is required. String
The GRPC address of the gateway.
hostname This property is required. String
The name of the gateway's host.
id This property is required. String
The ID of the gateway (for example: 8522744b25e2_gateway)
logicalname This property is required. String
The logical name of the gateway (for example: 8522744b25e2)
publicAddress This property is required. String
The public IP address of the gateway.
status This property is required. String
The status of the gateway.
version This property is required. String
The version of the gateway.
description This property is required. string
The description of the gateway.
grpcAddress This property is required. string
The GRPC address of the gateway.
hostname This property is required. string
The name of the gateway's host.
id This property is required. string
The ID of the gateway (for example: 8522744b25e2_gateway)
logicalname This property is required. string
The logical name of the gateway (for example: 8522744b25e2)
publicAddress This property is required. string
The public IP address of the gateway.
status This property is required. string
The status of the gateway.
version This property is required. string
The version of the gateway.
description This property is required. str
The description of the gateway.
grpc_address This property is required. str
The GRPC address of the gateway.
hostname This property is required. str
The name of the gateway's host.
id This property is required. str
The ID of the gateway (for example: 8522744b25e2_gateway)
logicalname This property is required. str
The logical name of the gateway (for example: 8522744b25e2)
public_address This property is required. str
The public IP address of the gateway.
status This property is required. str
The status of the gateway.
version This property is required. str
The version of the gateway.
description This property is required. String
The description of the gateway.
grpcAddress This property is required. String
The GRPC address of the gateway.
hostname This property is required. String
The name of the gateway's host.
id This property is required. String
The ID of the gateway (for example: 8522744b25e2_gateway)
logicalname This property is required. String
The logical name of the gateway (for example: 8522744b25e2)
publicAddress This property is required. String
The public IP address of the gateway.
status This property is required. String
The status of the gateway.
version This property is required. String
The version of the gateway.

Package Details

Repository
aquasec pulumiverse/pulumi-aquasec
License
Apache-2.0
Notes
This Pulumi package is based on the aquasec Terraform Provider.
Aquasec v0.8.29 published on Monday, Jul 22, 2024 by Pulumiverse