class ProjectsLocationsNetworkPolicies extends Resource (View source)

The "networkPolicies" collection of methods.

Typical usage is:

 $vmwareengineService = new Google\Service\VMwareEngine(...);
 $networkPolicies = $vmwareengineService->projects_locations_networkPolicies;

Methods

create(string $parent, NetworkPolicy $postBody, array $optParams = [])

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. (networkPolicies.create)

delete(string $name, array $optParams = [])

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. (networkPolicies.delete)

fetchExternalAddresses(string $networkPolicy, array $optParams = [])

Lists external IP addresses assigned to VMware workload VMs within the scope of the given network policy. (networkPolicies.fetchExternalAddresses)

get(string $name, array $optParams = [])

Retrieves a NetworkPolicy resource by its resource name.

listProjectsLocationsNetworkPolicies(string $parent, array $optParams = [])

Lists NetworkPolicy resources in a specified project and location.

patch(string $name, NetworkPolicy $postBody, array $optParams = [])

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. (networkPolicies.patch)

Details

Operation create(string $parent, NetworkPolicy $postBody, array $optParams = [])

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. (networkPolicies.create)

Parameters

string $parent

Required. The resource name of the location (region) to create the new network policy in. 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

NetworkPolicy $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

Operation delete(string $name, array $optParams = [])

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. (networkPolicies.delete)

Parameters

string $name

Required. The resource name of the network policy to delete. 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

array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

FetchNetworkPolicyExternalAddressesResponse fetchExternalAddresses(string $networkPolicy, array $optParams = [])

Lists external IP addresses assigned to VMware workload VMs within the scope of the given network policy. (networkPolicies.fetchExternalAddresses)

Parameters

string $networkPolicy

Required. The resource name of the network policy to query for assigned external IP addresses. 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-policy

array $optParams

Optional parameters.

Return Value

FetchNetworkPolicyExternalAddressesResponse

Exceptions

Exception

NetworkPolicy get(string $name, array $optParams = [])

Retrieves a NetworkPolicy resource by its resource name.

(networkPolicies.get)

Parameters

string $name

Required. The resource name of the network policy to retrieve. 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

array $optParams

Optional parameters.

Return Value

NetworkPolicy

Exceptions

Exception

ListNetworkPoliciesResponse listProjectsLocationsNetworkPolicies(string $parent, array $optParams = [])

Lists NetworkPolicy resources in a specified project and location.

(networkPolicies.listProjectsLocationsNetworkPolicies)

Parameters

string $parent

Required. The resource name of the location (region) to query for network policies. 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

array $optParams

Optional parameters.

Return Value

ListNetworkPoliciesResponse

Exceptions

Exception

Operation patch(string $name, NetworkPolicy $postBody, array $optParams = [])

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. (networkPolicies.patch)

Parameters

string $name

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

NetworkPolicy $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception