REST Resource: projects.locations.networkPolicies

Resource: NetworkPolicy

Represents a network policy resource. Network policies are regional resources. You can use a network policy to enable or disable internet access and external IP access. Network policies are associated with a VMware Engine network, which might span across regions. For a given region, a network policy applies to all private clouds in the VMware Engine network associated with the policy.

JSON representation
{
  "name": string,
  "createTime": string,
  "updateTime": string,
  "internetAccess": {
    object (NetworkService)
  },
  "externalIp": {
    object (NetworkService)
  },
  "edgeServicesCidr": string,
  "uid": string,
  "vmwareEngineNetwork": string,
  "description": string,
  "vmwareEngineNetworkCanonical": string
}
Fields
name

string

Output only. 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

createTime

string (Timestamp format)

Output only. Creation time of this resource.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

updateTime

string (Timestamp format)

Output only. Last update time of this resource.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

internetAccess

object (NetworkService)

Network service that allows VMware workloads to access the internet.

externalIp

object (NetworkService)

Network service that allows External IP addresses to be assigned to VMware workloads. This service can only be enabled when internetAccess is also enabled.

edgeServicesCidr

string

Required. 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.

uid

string

Output only. System-generated unique identifier for the resource.

vmwareEngineNetwork

string

Optional. The relative resource name of the VMware Engine network. Specify the name in the following form: projects/{project}/locations/{location}/vmwareEngineNetworks/{vmwareEngineNetworkId} where {project} can either be a project number or a project ID.

description

string

Optional. User-provided description for this network policy.

vmwareEngineNetworkCanonical

string

Output only. The canonical name of the VMware Engine network in the form: projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmwareEngineNetworkId}

NetworkService

Represents a network service that is managed by a NetworkPolicy resource. A network service provides a way to control an aspect of external access to VMware workloads. For example, whether the VMware workloads in the private clouds governed by a network policy can access or be accessed from the internet.

JSON representation
{
  "enabled": boolean,
  "state": enum (State)
}
Fields
enabled

boolean

True if the service is enabled; false otherwise.

state

enum (State)

Output only. State of the service. New values may be added to this enum when appropriate.

State

Enum State defines possible states of a network policy controlled service.

Enums
STATE_UNSPECIFIED Unspecified service state. This is the default value.
UNPROVISIONED Service is not provisioned.
RECONCILING Service is in the process of being provisioned/deprovisioned.
ACTIVE Service is active.

Methods

create

Creates a new network policy in a given VMware Engine network of a project and location (region).

delete

Deletes a NetworkPolicy resource.

get

Retrieves a NetworkPolicy resource by its resource name.

list

Lists NetworkPolicy resources in a specified project and location.

patch

Modifies a NetworkPolicy resource.