network_policies
Creates, updates, deletes, gets or lists a network_policies
resource.
Overview
Name | network_policies |
Type | Resource |
Id | google.vmwareengine.network_policies |
Fields
Name | Datatype | Description |
---|---|---|
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 |
description | string | Optional. User-provided description for this network policy. |
createTime | string | Output only. Creation time of this resource. |
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. |
externalIp | object | 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. |
internetAccess | object | 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. |
uid | string | Output only. System-generated unique identifier for the resource. |
updateTime | string | Output only. Last update time of this 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/{vmware_engine_network_id} where {project} can either be a project number or a project ID. |
vmwareEngineNetworkCanonical | string | Output only. The canonical name of the VMware Engine network in the form: projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id} |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | locationsId, networkPoliciesId, projectsId | Retrieves a NetworkPolicy resource by its resource name. |
list | SELECT | locationsId, projectsId | Lists NetworkPolicy resources in a specified project and location. |
create | INSERT | locationsId, projectsId | 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. |
delete | DELETE | locationsId, networkPoliciesId, projectsId | Deletes a NetworkPolicy resource. A network policy cannot be deleted when NetworkService.state is set to RECONCILING for either its external IP or internet access service. |
patch | UPDATE | locationsId, networkPoliciesId, projectsId | Modifies a NetworkPolicy resource. Only the following fields can be updated: internet_access , external_ip , edge_services_cidr . Only fields specified in updateMask are applied. When updating a network policy, the external IP network service can only be disabled if there are no external IP addresses present in the scope of the policy. Also, a NetworkService cannot be updated when NetworkService.state is set to RECONCILING . During operation processing, the resource is temporarily in the ACTIVE state before the operation fully completes. For that period of time, you can't update the resource. Use the operation status to determine when the processing fully completes. |
SELECT
examples
Lists NetworkPolicy
resources in a specified project and location.
SELECT
name,
description,
createTime,
edgeServicesCidr,
externalIp,
internetAccess,
uid,
updateTime,
vmwareEngineNetwork,
vmwareEngineNetworkCanonical
FROM google.vmwareengine.network_policies
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new network_policies
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.vmwareengine.network_policies (
locationsId,
projectsId,
internetAccess,
externalIp,
edgeServicesCidr,
vmwareEngineNetwork,
description
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ internetAccess }}',
'{{ externalIp }}',
'{{ edgeServicesCidr }}',
'{{ vmwareEngineNetwork }}',
'{{ description }}'
;
- name: your_resource_model_name
props:
- name: name
value: string
- name: createTime
value: string
- name: updateTime
value: string
- name: internetAccess
value:
- name: enabled
value: boolean
- name: state
value: string
- name: edgeServicesCidr
value: string
- name: uid
value: string
- name: vmwareEngineNetwork
value: string
- name: description
value: string
- name: vmwareEngineNetworkCanonical
value: string
UPDATE
example
Updates a network_policies
resource.
/*+ update */
UPDATE google.vmwareengine.network_policies
SET
internetAccess = '{{ internetAccess }}',
externalIp = '{{ externalIp }}',
edgeServicesCidr = '{{ edgeServicesCidr }}',
vmwareEngineNetwork = '{{ vmwareEngineNetwork }}',
description = '{{ description }}'
WHERE
locationsId = '{{ locationsId }}'
AND networkPoliciesId = '{{ networkPoliciesId }}'
AND projectsId = '{{ projectsId }}';
DELETE
example
Deletes the specified network_policies
resource.
/*+ delete */
DELETE FROM google.vmwareengine.network_policies
WHERE locationsId = '{{ locationsId }}'
AND networkPoliciesId = '{{ networkPoliciesId }}'
AND projectsId = '{{ projectsId }}';