spectrocloud 0.23.5 published on Sunday, Apr 20, 2025 by spectrocloud
spectrocloud.getPrivateCloudGateway
Explore with Pulumi AI
spectrocloud 0.23.5 published on Sunday, Apr 20, 2025 by spectrocloud
A data resource to get the ID or name of Private Cloud Gateway.
To learn more about Private Cloud Gateways, review the Private Cloud Gateway documentation.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as spectrocloud from "@pulumi/spectrocloud";
const examplePcg = spectrocloud.getPrivateCloudGateway({
name: "my-private-cloud-gateway",
});
export const pcgId = examplePcg.then(examplePcg => examplePcg.id);
export const pcgName = examplePcg.then(examplePcg => examplePcg.name);
import pulumi
import pulumi_spectrocloud as spectrocloud
example_pcg = spectrocloud.get_private_cloud_gateway(name="my-private-cloud-gateway")
pulumi.export("pcgId", example_pcg.id)
pulumi.export("pcgName", example_pcg.name)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/spectrocloud/spectrocloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
examplePcg, err := spectrocloud.GetPrivateCloudGateway(ctx, &spectrocloud.GetPrivateCloudGatewayArgs{
Name: pulumi.StringRef("my-private-cloud-gateway"),
}, nil)
if err != nil {
return err
}
ctx.Export("pcgId", examplePcg.Id)
ctx.Export("pcgName", examplePcg.Name)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Spectrocloud = Pulumi.Spectrocloud;
return await Deployment.RunAsync(() =>
{
var examplePcg = Spectrocloud.GetPrivateCloudGateway.Invoke(new()
{
Name = "my-private-cloud-gateway",
});
return new Dictionary<string, object?>
{
["pcgId"] = examplePcg.Apply(getPrivateCloudGatewayResult => getPrivateCloudGatewayResult.Id),
["pcgName"] = examplePcg.Apply(getPrivateCloudGatewayResult => getPrivateCloudGatewayResult.Name),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.spectrocloud.SpectrocloudFunctions;
import com.pulumi.spectrocloud.inputs.GetPrivateCloudGatewayArgs;
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 examplePcg = SpectrocloudFunctions.getPrivateCloudGateway(GetPrivateCloudGatewayArgs.builder()
.name("my-private-cloud-gateway")
.build());
ctx.export("pcgId", examplePcg.applyValue(getPrivateCloudGatewayResult -> getPrivateCloudGatewayResult.id()));
ctx.export("pcgName", examplePcg.applyValue(getPrivateCloudGatewayResult -> getPrivateCloudGatewayResult.name()));
}
}
variables:
examplePcg:
fn::invoke:
function: spectrocloud:getPrivateCloudGateway
arguments:
name: my-private-cloud-gateway
outputs:
# Output the retrieved PCG ID
pcgId: ${examplePcg.id}
# Output the retrieved PCG name
pcgName: ${examplePcg.name}
Using getPrivateCloudGateway
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 getPrivateCloudGateway(args: GetPrivateCloudGatewayArgs, opts?: InvokeOptions): Promise<GetPrivateCloudGatewayResult>
function getPrivateCloudGatewayOutput(args: GetPrivateCloudGatewayOutputArgs, opts?: InvokeOptions): Output<GetPrivateCloudGatewayResult>
def get_private_cloud_gateway(id: Optional[str] = None,
name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetPrivateCloudGatewayResult
def get_private_cloud_gateway_output(id: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetPrivateCloudGatewayResult]
func GetPrivateCloudGateway(ctx *Context, args *GetPrivateCloudGatewayArgs, opts ...InvokeOption) (*GetPrivateCloudGatewayResult, error)
func GetPrivateCloudGatewayOutput(ctx *Context, args *GetPrivateCloudGatewayOutputArgs, opts ...InvokeOption) GetPrivateCloudGatewayResultOutput
> Note: This function is named GetPrivateCloudGateway
in the Go SDK.
public static class GetPrivateCloudGateway
{
public static Task<GetPrivateCloudGatewayResult> InvokeAsync(GetPrivateCloudGatewayArgs args, InvokeOptions? opts = null)
public static Output<GetPrivateCloudGatewayResult> Invoke(GetPrivateCloudGatewayInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetPrivateCloudGatewayResult> getPrivateCloudGateway(GetPrivateCloudGatewayArgs args, InvokeOptions options)
public static Output<GetPrivateCloudGatewayResult> getPrivateCloudGateway(GetPrivateCloudGatewayArgs args, InvokeOptions options)
fn::invoke:
function: spectrocloud:index/getPrivateCloudGateway:getPrivateCloudGateway
arguments:
# arguments dictionary
The following arguments are supported:
getPrivateCloudGateway Result
The following output properties are available:
Package Details
- Repository
- spectrocloud spectrocloud/terraform-provider-spectrocloud
- License
- Notes
- This Pulumi package is based on the
spectrocloud
Terraform Provider.
spectrocloud 0.23.5 published on Sunday, Apr 20, 2025 by spectrocloud