1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. vmwareengine
  5. getExternalAccessRule
Google Cloud Classic v7.29.0 published on Wednesday, Jun 26, 2024 by Pulumi

gcp.vmwareengine.getExternalAccessRule

Explore with Pulumi AI

gcp logo
Google Cloud Classic v7.29.0 published on Wednesday, Jun 26, 2024 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",
    });
    
    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")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v7/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
    	})
    }
    
    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",
        });
    
    });
    
    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());
    
        }
    }
    
    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
    

    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>
    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]
    func LookupExternalAccessRule(ctx *Context, args *LookupExternalAccessRuleArgs, opts ...InvokeOption) (*LookupExternalAccessRuleResult, error)
    func LookupExternalAccessRuleOutput(ctx *Context, args *LookupExternalAccessRuleOutputArgs, opts ...InvokeOption) LookupExternalAccessRuleResultOutput

    > 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)
    }
    public static CompletableFuture<GetExternalAccessRuleResult> getExternalAccessRule(GetExternalAccessRuleArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: gcp:vmwareengine/getExternalAccessRule:getExternalAccessRule
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    Name of the resource.
    Parent string
    The resource name of the network policy that this cluster belongs.
    Name string
    Name of the resource.
    Parent string
    The resource name of the network policy that this cluster belongs.
    name String
    Name of the resource.
    parent String
    The resource name of the network policy that this cluster belongs.
    name string
    Name of the resource.
    parent string
    The resource name of the network policy that this cluster belongs.
    name str
    Name of the resource.
    parent str
    The resource name of the network policy that this cluster belongs.
    name String
    Name of the resource.
    parent 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 string
    The name of an 'ExternalAddress' resource.
    IpAddressRange string
    An IP address range in the CIDR format.
    ExternalAddress string
    The name of an 'ExternalAddress' resource.
    IpAddressRange string
    An IP address range in the CIDR format.
    externalAddress String
    The name of an 'ExternalAddress' resource.
    ipAddressRange String
    An IP address range in the CIDR format.
    externalAddress string
    The name of an 'ExternalAddress' resource.
    ipAddressRange string
    An IP address range in the CIDR format.
    external_address str
    The name of an 'ExternalAddress' resource.
    ip_address_range str
    An IP address range in the CIDR format.
    externalAddress String
    The name of an 'ExternalAddress' resource.
    ipAddressRange String
    An IP address range in the CIDR format.

    GetExternalAccessRuleSourceIpRange

    IpAddress string
    A single IP address.
    IpAddressRange string
    An IP address range in the CIDR format.
    IpAddress string
    A single IP address.
    IpAddressRange string
    An IP address range in the CIDR format.
    ipAddress String
    A single IP address.
    ipAddressRange String
    An IP address range in the CIDR format.
    ipAddress string
    A single IP address.
    ipAddressRange string
    An IP address range in the CIDR format.
    ip_address str
    A single IP address.
    ip_address_range str
    An IP address range in the CIDR format.
    ipAddress String
    A single IP address.
    ipAddressRange 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.
    gcp logo
    Google Cloud Classic v7.29.0 published on Wednesday, Jun 26, 2024 by Pulumi