Google Cloud Classic v7.29.0 published on Wednesday, Jun 26, 2024 by Pulumi
gcp.vmwareengine.getNetworkPolicy
Explore with Pulumi AI
Use this data source to get details about a network policy resource.
To get more information about network policy, see:
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const myNetworkPolicy = gcp.vmwareengine.getNetworkPolicy({
name: "my-network-policy",
location: "us-central1",
});
import pulumi
import pulumi_gcp as gcp
my_network_policy = gcp.vmwareengine.get_network_policy(name="my-network-policy",
location="us-central1")
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.LookupNetworkPolicy(ctx, &vmwareengine.LookupNetworkPolicyArgs{
Name: "my-network-policy",
Location: "us-central1",
}, 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 myNetworkPolicy = Gcp.VMwareEngine.GetNetworkPolicy.Invoke(new()
{
Name = "my-network-policy",
Location = "us-central1",
});
});
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.GetNetworkPolicyArgs;
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 myNetworkPolicy = VmwareengineFunctions.getNetworkPolicy(GetNetworkPolicyArgs.builder()
.name("my-network-policy")
.location("us-central1")
.build());
}
}
variables:
myNetworkPolicy:
fn::invoke:
Function: gcp:vmwareengine:getNetworkPolicy
Arguments:
name: my-network-policy
location: us-central1
Using getNetworkPolicy
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 getNetworkPolicy(args: GetNetworkPolicyArgs, opts?: InvokeOptions): Promise<GetNetworkPolicyResult>
function getNetworkPolicyOutput(args: GetNetworkPolicyOutputArgs, opts?: InvokeOptions): Output<GetNetworkPolicyResult>
def get_network_policy(location: Optional[str] = None,
name: Optional[str] = None,
project: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetNetworkPolicyResult
def get_network_policy_output(location: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
project: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetNetworkPolicyResult]
func LookupNetworkPolicy(ctx *Context, args *LookupNetworkPolicyArgs, opts ...InvokeOption) (*LookupNetworkPolicyResult, error)
func LookupNetworkPolicyOutput(ctx *Context, args *LookupNetworkPolicyOutputArgs, opts ...InvokeOption) LookupNetworkPolicyResultOutput
> Note: This function is named LookupNetworkPolicy
in the Go SDK.
public static class GetNetworkPolicy
{
public static Task<GetNetworkPolicyResult> InvokeAsync(GetNetworkPolicyArgs args, InvokeOptions? opts = null)
public static Output<GetNetworkPolicyResult> Invoke(GetNetworkPolicyInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetNetworkPolicyResult> getNetworkPolicy(GetNetworkPolicyArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: gcp:vmwareengine/getNetworkPolicy:getNetworkPolicy
arguments:
# arguments dictionary
The following arguments are supported:
getNetworkPolicy Result
The following output properties are available:
- Create
Time string - Description string
- Edge
Services stringCidr - External
Ips List<GetNetwork Policy External Ip> - Id string
- The provider-assigned unique ID for this managed resource.
- Internet
Accesses List<GetNetwork Policy Internet Access> - Location string
- Name string
- Uid string
- Update
Time string - Vmware
Engine stringNetwork - Vmware
Engine stringNetwork Canonical - Project string
- Create
Time string - Description string
- Edge
Services stringCidr - External
Ips []GetNetwork Policy External Ip - Id string
- The provider-assigned unique ID for this managed resource.
- Internet
Accesses []GetNetwork Policy Internet Access - Location string
- Name string
- Uid string
- Update
Time string - Vmware
Engine stringNetwork - Vmware
Engine stringNetwork Canonical - Project string
- create
Time String - description String
- edge
Services StringCidr - external
Ips List<GetNetwork Policy External Ip> - id String
- The provider-assigned unique ID for this managed resource.
- internet
Accesses List<GetNetwork Policy Internet Access> - location String
- name String
- uid String
- update
Time String - vmware
Engine StringNetwork - vmware
Engine StringNetwork Canonical - project String
- create
Time string - description string
- edge
Services stringCidr - external
Ips GetNetwork Policy External Ip[] - id string
- The provider-assigned unique ID for this managed resource.
- internet
Accesses GetNetwork Policy Internet Access[] - location string
- name string
- uid string
- update
Time string - vmware
Engine stringNetwork - vmware
Engine stringNetwork Canonical - project string
- create_
time str - description str
- edge_
services_ strcidr - external_
ips Sequence[GetNetwork Policy External Ip] - id str
- The provider-assigned unique ID for this managed resource.
- internet_
accesses Sequence[GetNetwork Policy Internet Access] - location str
- name str
- uid str
- update_
time str - vmware_
engine_ strnetwork - vmware_
engine_ strnetwork_ canonical - project str
- create
Time String - description String
- edge
Services StringCidr - external
Ips List<Property Map> - id String
- The provider-assigned unique ID for this managed resource.
- internet
Accesses List<Property Map> - location String
- name String
- uid String
- update
Time String - vmware
Engine StringNetwork - vmware
Engine StringNetwork Canonical - project String
Supporting Types
GetNetworkPolicyExternalIp
GetNetworkPolicyInternetAccess
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.