1. Packages
  2. Google Cloud Native
  3. API Docs
  4. vmwareengine
  5. vmwareengine/v1
  6. NetworkPolicy

Google Cloud Native is in preview. Google Cloud Classic is fully supported.

Google Cloud Native v0.32.0 published on Wednesday, Nov 29, 2023 by Pulumi

google-native.vmwareengine/v1.NetworkPolicy

Explore with Pulumi AI

google-native logo

Google Cloud Native is in preview. Google Cloud Classic is fully supported.

Google Cloud Native v0.32.0 published on Wednesday, Nov 29, 2023 by Pulumi

    Creates a new network policy in a given VMware Engine network of a project and location (region). A new network policy cannot be created if another network policy already exists in the same scope. Auto-naming is currently not supported for this resource.

    Create NetworkPolicy Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new NetworkPolicy(name: string, args: NetworkPolicyArgs, opts?: CustomResourceOptions);
    @overload
    def NetworkPolicy(resource_name: str,
                      args: NetworkPolicyArgs,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def NetworkPolicy(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      edge_services_cidr: Optional[str] = None,
                      network_policy_id: Optional[str] = None,
                      description: Optional[str] = None,
                      external_ip: Optional[NetworkServiceArgs] = None,
                      internet_access: Optional[NetworkServiceArgs] = None,
                      location: Optional[str] = None,
                      project: Optional[str] = None,
                      request_id: Optional[str] = None,
                      vmware_engine_network: Optional[str] = None)
    func NewNetworkPolicy(ctx *Context, name string, args NetworkPolicyArgs, opts ...ResourceOption) (*NetworkPolicy, error)
    public NetworkPolicy(string name, NetworkPolicyArgs args, CustomResourceOptions? opts = null)
    public NetworkPolicy(String name, NetworkPolicyArgs args)
    public NetworkPolicy(String name, NetworkPolicyArgs args, CustomResourceOptions options)
    
    type: google-native:vmwareengine/v1:NetworkPolicy
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args NetworkPolicyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args NetworkPolicyArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args NetworkPolicyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args NetworkPolicyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args NetworkPolicyArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var networkPolicyResource = new GoogleNative.VMwareEngine.V1.NetworkPolicy("networkPolicyResource", new()
    {
        EdgeServicesCidr = "string",
        NetworkPolicyId = "string",
        Description = "string",
        ExternalIp = new GoogleNative.VMwareEngine.V1.Inputs.NetworkServiceArgs
        {
            Enabled = false,
        },
        InternetAccess = new GoogleNative.VMwareEngine.V1.Inputs.NetworkServiceArgs
        {
            Enabled = false,
        },
        Location = "string",
        Project = "string",
        RequestId = "string",
        VmwareEngineNetwork = "string",
    });
    
    example, err := vmwareengine.NewNetworkPolicy(ctx, "networkPolicyResource", &vmwareengine.NetworkPolicyArgs{
    EdgeServicesCidr: pulumi.String("string"),
    NetworkPolicyId: pulumi.String("string"),
    Description: pulumi.String("string"),
    ExternalIp: &vmwareengine.NetworkServiceArgs{
    Enabled: pulumi.Bool(false),
    },
    InternetAccess: &vmwareengine.NetworkServiceArgs{
    Enabled: pulumi.Bool(false),
    },
    Location: pulumi.String("string"),
    Project: pulumi.String("string"),
    RequestId: pulumi.String("string"),
    VmwareEngineNetwork: pulumi.String("string"),
    })
    
    var networkPolicyResource = new NetworkPolicy("networkPolicyResource", NetworkPolicyArgs.builder()
        .edgeServicesCidr("string")
        .networkPolicyId("string")
        .description("string")
        .externalIp(NetworkServiceArgs.builder()
            .enabled(false)
            .build())
        .internetAccess(NetworkServiceArgs.builder()
            .enabled(false)
            .build())
        .location("string")
        .project("string")
        .requestId("string")
        .vmwareEngineNetwork("string")
        .build());
    
    network_policy_resource = google_native.vmwareengine.v1.NetworkPolicy("networkPolicyResource",
        edge_services_cidr="string",
        network_policy_id="string",
        description="string",
        external_ip=google_native.vmwareengine.v1.NetworkServiceArgs(
            enabled=False,
        ),
        internet_access=google_native.vmwareengine.v1.NetworkServiceArgs(
            enabled=False,
        ),
        location="string",
        project="string",
        request_id="string",
        vmware_engine_network="string")
    
    const networkPolicyResource = new google_native.vmwareengine.v1.NetworkPolicy("networkPolicyResource", {
        edgeServicesCidr: "string",
        networkPolicyId: "string",
        description: "string",
        externalIp: {
            enabled: false,
        },
        internetAccess: {
            enabled: false,
        },
        location: "string",
        project: "string",
        requestId: "string",
        vmwareEngineNetwork: "string",
    });
    
    type: google-native:vmwareengine/v1:NetworkPolicy
    properties:
        description: string
        edgeServicesCidr: string
        externalIp:
            enabled: false
        internetAccess:
            enabled: false
        location: string
        networkPolicyId: string
        project: string
        requestId: string
        vmwareEngineNetwork: string
    

    NetworkPolicy Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The NetworkPolicy resource accepts the following input properties:

    EdgeServicesCidr string
    IP address range in CIDR notation used to create internet access and external IP access. An RFC 1918 CIDR block, with a "/26" prefix, is required. The range cannot overlap with any prefixes either in the consumer VPC network or in use by the private clouds attached to that VPC network.
    NetworkPolicyId string
    Required. The user-provided identifier of the network policy to be created. This identifier must be unique within parent projects/{my-project}/locations/{us-central1}/networkPolicies and becomes the final token in the name URI. The identifier must meet the following requirements: * Only contains 1-63 alphanumeric characters and hyphens * Begins with an alphabetical character * Ends with a non-hyphen character * Not formatted as a UUID * Complies with RFC 1034 (section 3.5)
    Description string
    Optional. User-provided description for this network policy.
    ExternalIp Pulumi.GoogleNative.VMwareEngine.V1.Inputs.NetworkService
    Network service that allows External IP addresses to be assigned to VMware workloads. This service can only be enabled when internet_access is also enabled.
    InternetAccess Pulumi.GoogleNative.VMwareEngine.V1.Inputs.NetworkService
    Network service that allows VMware workloads to access the internet.
    Location string
    Project string
    RequestId string
    Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
    VmwareEngineNetwork string
    Optional. The relative resource name of the VMware Engine network. Specify the name in the following form: projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id} where {project} can either be a project number or a project ID.
    EdgeServicesCidr string
    IP address range in CIDR notation used to create internet access and external IP access. An RFC 1918 CIDR block, with a "/26" prefix, is required. The range cannot overlap with any prefixes either in the consumer VPC network or in use by the private clouds attached to that VPC network.
    NetworkPolicyId string
    Required. The user-provided identifier of the network policy to be created. This identifier must be unique within parent projects/{my-project}/locations/{us-central1}/networkPolicies and becomes the final token in the name URI. The identifier must meet the following requirements: * Only contains 1-63 alphanumeric characters and hyphens * Begins with an alphabetical character * Ends with a non-hyphen character * Not formatted as a UUID * Complies with RFC 1034 (section 3.5)
    Description string
    Optional. User-provided description for this network policy.
    ExternalIp NetworkServiceArgs
    Network service that allows External IP addresses to be assigned to VMware workloads. This service can only be enabled when internet_access is also enabled.
    InternetAccess NetworkServiceArgs
    Network service that allows VMware workloads to access the internet.
    Location string
    Project string
    RequestId string
    Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
    VmwareEngineNetwork string
    Optional. The relative resource name of the VMware Engine network. Specify the name in the following form: projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id} where {project} can either be a project number or a project ID.
    edgeServicesCidr String
    IP address range in CIDR notation used to create internet access and external IP access. An RFC 1918 CIDR block, with a "/26" prefix, is required. The range cannot overlap with any prefixes either in the consumer VPC network or in use by the private clouds attached to that VPC network.
    networkPolicyId String
    Required. The user-provided identifier of the network policy to be created. This identifier must be unique within parent projects/{my-project}/locations/{us-central1}/networkPolicies and becomes the final token in the name URI. The identifier must meet the following requirements: * Only contains 1-63 alphanumeric characters and hyphens * Begins with an alphabetical character * Ends with a non-hyphen character * Not formatted as a UUID * Complies with RFC 1034 (section 3.5)
    description String
    Optional. User-provided description for this network policy.
    externalIp NetworkService
    Network service that allows External IP addresses to be assigned to VMware workloads. This service can only be enabled when internet_access is also enabled.
    internetAccess NetworkService
    Network service that allows VMware workloads to access the internet.
    location String
    project String
    requestId String
    Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
    vmwareEngineNetwork String
    Optional. The relative resource name of the VMware Engine network. Specify the name in the following form: projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id} where {project} can either be a project number or a project ID.
    edgeServicesCidr string
    IP address range in CIDR notation used to create internet access and external IP access. An RFC 1918 CIDR block, with a "/26" prefix, is required. The range cannot overlap with any prefixes either in the consumer VPC network or in use by the private clouds attached to that VPC network.
    networkPolicyId string
    Required. The user-provided identifier of the network policy to be created. This identifier must be unique within parent projects/{my-project}/locations/{us-central1}/networkPolicies and becomes the final token in the name URI. The identifier must meet the following requirements: * Only contains 1-63 alphanumeric characters and hyphens * Begins with an alphabetical character * Ends with a non-hyphen character * Not formatted as a UUID * Complies with RFC 1034 (section 3.5)
    description string
    Optional. User-provided description for this network policy.
    externalIp NetworkService
    Network service that allows External IP addresses to be assigned to VMware workloads. This service can only be enabled when internet_access is also enabled.
    internetAccess NetworkService
    Network service that allows VMware workloads to access the internet.
    location string
    project string
    requestId string
    Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
    vmwareEngineNetwork string
    Optional. The relative resource name of the VMware Engine network. Specify the name in the following form: projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id} where {project} can either be a project number or a project ID.
    edge_services_cidr str
    IP address range in CIDR notation used to create internet access and external IP access. An RFC 1918 CIDR block, with a "/26" prefix, is required. The range cannot overlap with any prefixes either in the consumer VPC network or in use by the private clouds attached to that VPC network.
    network_policy_id str
    Required. The user-provided identifier of the network policy to be created. This identifier must be unique within parent projects/{my-project}/locations/{us-central1}/networkPolicies and becomes the final token in the name URI. The identifier must meet the following requirements: * Only contains 1-63 alphanumeric characters and hyphens * Begins with an alphabetical character * Ends with a non-hyphen character * Not formatted as a UUID * Complies with RFC 1034 (section 3.5)
    description str
    Optional. User-provided description for this network policy.
    external_ip NetworkServiceArgs
    Network service that allows External IP addresses to be assigned to VMware workloads. This service can only be enabled when internet_access is also enabled.
    internet_access NetworkServiceArgs
    Network service that allows VMware workloads to access the internet.
    location str
    project str
    request_id str
    Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
    vmware_engine_network str
    Optional. The relative resource name of the VMware Engine network. Specify the name in the following form: projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id} where {project} can either be a project number or a project ID.
    edgeServicesCidr String
    IP address range in CIDR notation used to create internet access and external IP access. An RFC 1918 CIDR block, with a "/26" prefix, is required. The range cannot overlap with any prefixes either in the consumer VPC network or in use by the private clouds attached to that VPC network.
    networkPolicyId String
    Required. The user-provided identifier of the network policy to be created. This identifier must be unique within parent projects/{my-project}/locations/{us-central1}/networkPolicies and becomes the final token in the name URI. The identifier must meet the following requirements: * Only contains 1-63 alphanumeric characters and hyphens * Begins with an alphabetical character * Ends with a non-hyphen character * Not formatted as a UUID * Complies with RFC 1034 (section 3.5)
    description String
    Optional. User-provided description for this network policy.
    externalIp Property Map
    Network service that allows External IP addresses to be assigned to VMware workloads. This service can only be enabled when internet_access is also enabled.
    internetAccess Property Map
    Network service that allows VMware workloads to access the internet.
    location String
    project String
    requestId String
    Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
    vmwareEngineNetwork String
    Optional. The relative resource name of the VMware Engine network. Specify the name in the following form: projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id} where {project} can either be a project number or a project ID.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the NetworkPolicy resource produces the following output properties:

    CreateTime string
    Creation time of this resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The resource name of this network policy. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: projects/my-project/locations/us-central1/networkPolicies/my-network-policy
    Uid string
    System-generated unique identifier for the resource.
    UpdateTime string
    Last update time of this resource.
    VmwareEngineNetworkCanonical string
    The canonical name of the VMware Engine network in the form: projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}
    CreateTime string
    Creation time of this resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The resource name of this network policy. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: projects/my-project/locations/us-central1/networkPolicies/my-network-policy
    Uid string
    System-generated unique identifier for the resource.
    UpdateTime string
    Last update time of this resource.
    VmwareEngineNetworkCanonical string
    The canonical name of the VMware Engine network in the form: projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}
    createTime String
    Creation time of this resource.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The resource name of this network policy. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: projects/my-project/locations/us-central1/networkPolicies/my-network-policy
    uid String
    System-generated unique identifier for the resource.
    updateTime String
    Last update time of this resource.
    vmwareEngineNetworkCanonical String
    The canonical name of the VMware Engine network in the form: projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}
    createTime string
    Creation time of this resource.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    The resource name of this network policy. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: projects/my-project/locations/us-central1/networkPolicies/my-network-policy
    uid string
    System-generated unique identifier for the resource.
    updateTime string
    Last update time of this resource.
    vmwareEngineNetworkCanonical string
    The canonical name of the VMware Engine network in the form: projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}
    create_time str
    Creation time of this resource.
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    The resource name of this network policy. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: projects/my-project/locations/us-central1/networkPolicies/my-network-policy
    uid str
    System-generated unique identifier for the resource.
    update_time str
    Last update time of this resource.
    vmware_engine_network_canonical str
    The canonical name of the VMware Engine network in the form: projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}
    createTime String
    Creation time of this resource.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The resource name of this network policy. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: projects/my-project/locations/us-central1/networkPolicies/my-network-policy
    uid String
    System-generated unique identifier for the resource.
    updateTime String
    Last update time of this resource.
    vmwareEngineNetworkCanonical String
    The canonical name of the VMware Engine network in the form: projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}

    Supporting Types

    NetworkService, NetworkServiceArgs

    Enabled bool
    True if the service is enabled; false otherwise.
    Enabled bool
    True if the service is enabled; false otherwise.
    enabled Boolean
    True if the service is enabled; false otherwise.
    enabled boolean
    True if the service is enabled; false otherwise.
    enabled bool
    True if the service is enabled; false otherwise.
    enabled Boolean
    True if the service is enabled; false otherwise.

    NetworkServiceResponse, NetworkServiceResponseArgs

    Enabled bool
    True if the service is enabled; false otherwise.
    State string
    State of the service. New values may be added to this enum when appropriate.
    Enabled bool
    True if the service is enabled; false otherwise.
    State string
    State of the service. New values may be added to this enum when appropriate.
    enabled Boolean
    True if the service is enabled; false otherwise.
    state String
    State of the service. New values may be added to this enum when appropriate.
    enabled boolean
    True if the service is enabled; false otherwise.
    state string
    State of the service. New values may be added to this enum when appropriate.
    enabled bool
    True if the service is enabled; false otherwise.
    state str
    State of the service. New values may be added to this enum when appropriate.
    enabled Boolean
    True if the service is enabled; false otherwise.
    state String
    State of the service. New values may be added to this enum when appropriate.

    Package Details

    Repository
    Google Cloud Native pulumi/pulumi-google-native
    License
    Apache-2.0
    google-native logo

    Google Cloud Native is in preview. Google Cloud Classic is fully supported.

    Google Cloud Native v0.32.0 published on Wednesday, Nov 29, 2023 by Pulumi