1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. vmwareengine
  5. getExternalAccessRule
Google Cloud v8.27.1 published on Friday, Apr 25, 2025 by Pulumi

gcp.vmwareengine.getExternalAccessRule

Explore with Pulumi AI

Google Cloud v8.27.1 published on Friday, Apr 25, 2025 by Pulumi

Use this data source to get details about a external access rule resource.

To get more information about external address, see:

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const myExternalAccessRule = gcp.vmwareengine.getExternalAccessRule({
    name: "my-external-access-rule",
    parent: "project/my-project/locations/us-west1-a/networkPolicies/my-network-policy",
});
Copy
import pulumi
import pulumi_gcp as gcp

my_external_access_rule = gcp.vmwareengine.get_external_access_rule(name="my-external-access-rule",
    parent="project/my-project/locations/us-west1-a/networkPolicies/my-network-policy")
Copy
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/vmwareengine"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := vmwareengine.LookupExternalAccessRule(ctx, &vmwareengine.LookupExternalAccessRuleArgs{
			Name:   "my-external-access-rule",
			Parent: "project/my-project/locations/us-west1-a/networkPolicies/my-network-policy",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var myExternalAccessRule = Gcp.VMwareEngine.GetExternalAccessRule.Invoke(new()
    {
        Name = "my-external-access-rule",
        Parent = "project/my-project/locations/us-west1-a/networkPolicies/my-network-policy",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.vmwareengine.VmwareengineFunctions;
import com.pulumi.gcp.vmwareengine.inputs.GetExternalAccessRuleArgs;
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 myExternalAccessRule = VmwareengineFunctions.getExternalAccessRule(GetExternalAccessRuleArgs.builder()
            .name("my-external-access-rule")
            .parent("project/my-project/locations/us-west1-a/networkPolicies/my-network-policy")
            .build());

    }
}
Copy
variables:
  myExternalAccessRule:
    fn::invoke:
      function: gcp:vmwareengine:getExternalAccessRule
      arguments:
        name: my-external-access-rule
        parent: project/my-project/locations/us-west1-a/networkPolicies/my-network-policy
Copy

Using getExternalAccessRule

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 getExternalAccessRule(args: GetExternalAccessRuleArgs, opts?: InvokeOptions): Promise<GetExternalAccessRuleResult>
function getExternalAccessRuleOutput(args: GetExternalAccessRuleOutputArgs, opts?: InvokeOptions): Output<GetExternalAccessRuleResult>
Copy
def get_external_access_rule(name: Optional[str] = None,
                             parent: Optional[str] = None,
                             opts: Optional[InvokeOptions] = None) -> GetExternalAccessRuleResult
def get_external_access_rule_output(name: Optional[pulumi.Input[str]] = None,
                             parent: Optional[pulumi.Input[str]] = None,
                             opts: Optional[InvokeOptions] = None) -> Output[GetExternalAccessRuleResult]
Copy
func LookupExternalAccessRule(ctx *Context, args *LookupExternalAccessRuleArgs, opts ...InvokeOption) (*LookupExternalAccessRuleResult, error)
func LookupExternalAccessRuleOutput(ctx *Context, args *LookupExternalAccessRuleOutputArgs, opts ...InvokeOption) LookupExternalAccessRuleResultOutput
Copy

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

public static class GetExternalAccessRule 
{
    public static Task<GetExternalAccessRuleResult> InvokeAsync(GetExternalAccessRuleArgs args, InvokeOptions? opts = null)
    public static Output<GetExternalAccessRuleResult> Invoke(GetExternalAccessRuleInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetExternalAccessRuleResult> getExternalAccessRule(GetExternalAccessRuleArgs args, InvokeOptions options)
public static Output<GetExternalAccessRuleResult> getExternalAccessRule(GetExternalAccessRuleArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: gcp:vmwareengine/getExternalAccessRule:getExternalAccessRule
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Name This property is required. string
Name of the resource.
Parent This property is required. string
The resource name of the network policy that this cluster belongs.
Name This property is required. string
Name of the resource.
Parent This property is required. string
The resource name of the network policy that this cluster belongs.
name This property is required. String
Name of the resource.
parent This property is required. String
The resource name of the network policy that this cluster belongs.
name This property is required. string
Name of the resource.
parent This property is required. string
The resource name of the network policy that this cluster belongs.
name This property is required. str
Name of the resource.
parent This property is required. str
The resource name of the network policy that this cluster belongs.
name This property is required. String
Name of the resource.
parent This property is required. String
The resource name of the network policy that this cluster belongs.

getExternalAccessRule Result

The following output properties are available:

Action string
CreateTime string
Description string
DestinationIpRanges List<GetExternalAccessRuleDestinationIpRange>
DestinationPorts List<string>
Id string
The provider-assigned unique ID for this managed resource.
IpProtocol string
Name string
Parent string
Priority int
SourceIpRanges List<GetExternalAccessRuleSourceIpRange>
SourcePorts List<string>
State string
Uid string
UpdateTime string
Action string
CreateTime string
Description string
DestinationIpRanges []GetExternalAccessRuleDestinationIpRange
DestinationPorts []string
Id string
The provider-assigned unique ID for this managed resource.
IpProtocol string
Name string
Parent string
Priority int
SourceIpRanges []GetExternalAccessRuleSourceIpRange
SourcePorts []string
State string
Uid string
UpdateTime string
action String
createTime String
description String
destinationIpRanges List<GetExternalAccessRuleDestinationIpRange>
destinationPorts List<String>
id String
The provider-assigned unique ID for this managed resource.
ipProtocol String
name String
parent String
priority Integer
sourceIpRanges List<GetExternalAccessRuleSourceIpRange>
sourcePorts List<String>
state String
uid String
updateTime String
action string
createTime string
description string
destinationIpRanges GetExternalAccessRuleDestinationIpRange[]
destinationPorts string[]
id string
The provider-assigned unique ID for this managed resource.
ipProtocol string
name string
parent string
priority number
sourceIpRanges GetExternalAccessRuleSourceIpRange[]
sourcePorts string[]
state string
uid string
updateTime string
action String
createTime String
description String
destinationIpRanges List<Property Map>
destinationPorts List<String>
id String
The provider-assigned unique ID for this managed resource.
ipProtocol String
name String
parent String
priority Number
sourceIpRanges List<Property Map>
sourcePorts List<String>
state String
uid String
updateTime String

Supporting Types

GetExternalAccessRuleDestinationIpRange

ExternalAddress This property is required. string
The name of an 'ExternalAddress' resource.
IpAddressRange This property is required. string
An IP address range in the CIDR format.
ExternalAddress This property is required. string
The name of an 'ExternalAddress' resource.
IpAddressRange This property is required. string
An IP address range in the CIDR format.
externalAddress This property is required. String
The name of an 'ExternalAddress' resource.
ipAddressRange This property is required. String
An IP address range in the CIDR format.
externalAddress This property is required. string
The name of an 'ExternalAddress' resource.
ipAddressRange This property is required. string
An IP address range in the CIDR format.
external_address This property is required. str
The name of an 'ExternalAddress' resource.
ip_address_range This property is required. str
An IP address range in the CIDR format.
externalAddress This property is required. String
The name of an 'ExternalAddress' resource.
ipAddressRange This property is required. String
An IP address range in the CIDR format.

GetExternalAccessRuleSourceIpRange

IpAddress This property is required. string
A single IP address.
IpAddressRange This property is required. string
An IP address range in the CIDR format.
IpAddress This property is required. string
A single IP address.
IpAddressRange This property is required. string
An IP address range in the CIDR format.
ipAddress This property is required. String
A single IP address.
ipAddressRange This property is required. String
An IP address range in the CIDR format.
ipAddress This property is required. string
A single IP address.
ipAddressRange This property is required. string
An IP address range in the CIDR format.
ip_address This property is required. str
A single IP address.
ip_address_range This property is required. str
An IP address range in the CIDR format.
ipAddress This property is required. String
A single IP address.
ipAddressRange This property is required. String
An IP address range in the CIDR format.

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.
Google Cloud v8.27.1 published on Friday, Apr 25, 2025 by Pulumi