Skip to main content

endpoint_policies

Creates, updates, deletes, gets or lists an endpoint_policies resource.

Overview

Nameendpoint_policies
TypeResource
Idgoogle.networkservices.endpoint_policies

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringIdentifier. Name of the EndpointPolicy resource. It matches pattern projects/{project}/locations/global/endpointPolicies/{endpoint_policy}.
authorizationPolicystringOptional. This field specifies the URL of AuthorizationPolicy resource that applies authorization policies to the inbound traffic at the matched endpoints. Refer to Authorization. If this field is not specified, authorization is disabled(no authz checks) for this endpoint.
clientTlsPolicystringOptional. A URL referring to a ClientTlsPolicy resource. ClientTlsPolicy can be set to specify the authentication for traffic from the proxy to the actual endpoints. More specifically, it is applied to the outgoing traffic from the proxy to the endpoint. This is typically used for sidecar model where the proxy identifies itself as endpoint to the control plane, with the connection between sidecar and endpoint requiring authentication. If this field is not set, authentication is disabled(open). Applicable only when EndpointPolicyType is SIDECAR_PROXY.
createTimestring (google-datetime)Output only. The timestamp when the resource was created.
descriptionstringOptional. A free-text description of the resource. Max length 1024 characters.
endpointMatcherobjectRequired. A matcher that selects endpoints to which the policies should be applied. (id: EndpointMatcher)
labelsobjectOptional. Set of label tags associated with the EndpointPolicy resource.
serverTlsPolicystringOptional. A URL referring to ServerTlsPolicy resource. ServerTlsPolicy is used to determine the authentication policy to be applied to terminate the inbound traffic at the identified backends. If this field is not set, authentication is disabled(open) for this endpoint.
trafficPortSelectorobjectOptional. Port selector for the (matched) endpoints. If no port selector is provided, the matched config is applied to all ports. (id: TrafficPortSelector)
typestringRequired. The type of endpoint policy. This is primarily used to validate the configuration.
updateTimestring (google-datetime)Output only. The timestamp when the resource was updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, endpointPoliciesIdGets details of a single EndpointPolicy.
listselectprojectsId, locationsIdpageSize, pageToken, returnPartialSuccessLists EndpointPolicies in a given project and location.
createinsertprojectsId, locationsIdendpointPolicyIdCreates a new EndpointPolicy in a given project and location.
patchupdateprojectsId, locationsId, endpointPoliciesIdupdateMaskUpdates the parameters of a single EndpointPolicy.
deletedeleteprojectsId, locationsId, endpointPoliciesIdDeletes a single EndpointPolicy.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
endpointPoliciesIdstring
locationsIdstring
projectsIdstring
endpointPolicyIdstring
pageSizeinteger (int32)
pageTokenstring
returnPartialSuccessboolean
updateMaskstring (google-fieldmask)

SELECT examples

Gets details of a single EndpointPolicy.

SELECT
name,
authorizationPolicy,
clientTlsPolicy,
createTime,
description,
endpointMatcher,
labels,
serverTlsPolicy,
trafficPortSelector,
type,
updateTime
FROM google.networkservices.endpoint_policies
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND endpointPoliciesId = '{{ endpointPoliciesId }}' -- required;

INSERT examples

Creates a new EndpointPolicy in a given project and location.

INSERT INTO google.networkservices.endpoint_policies (
data__name,
data__labels,
data__type,
data__authorizationPolicy,
data__endpointMatcher,
data__trafficPortSelector,
data__description,
data__serverTlsPolicy,
data__clientTlsPolicy,
projectsId,
locationsId,
endpointPolicyId
)
SELECT
'{{ name }}',
'{{ labels }}',
'{{ type }}',
'{{ authorizationPolicy }}',
'{{ endpointMatcher }}',
'{{ trafficPortSelector }}',
'{{ description }}',
'{{ serverTlsPolicy }}',
'{{ clientTlsPolicy }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ endpointPolicyId }}'
RETURNING
name,
done,
error,
metadata,
response
;

UPDATE examples

Updates the parameters of a single EndpointPolicy.

UPDATE google.networkservices.endpoint_policies
SET
data__name = '{{ name }}',
data__labels = '{{ labels }}',
data__type = '{{ type }}',
data__authorizationPolicy = '{{ authorizationPolicy }}',
data__endpointMatcher = '{{ endpointMatcher }}',
data__trafficPortSelector = '{{ trafficPortSelector }}',
data__description = '{{ description }}',
data__serverTlsPolicy = '{{ serverTlsPolicy }}',
data__clientTlsPolicy = '{{ clientTlsPolicy }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND endpointPoliciesId = '{{ endpointPoliciesId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
done,
error,
metadata,
response;

DELETE examples

Deletes a single EndpointPolicy.

DELETE FROM google.networkservices.endpoint_policies
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND endpointPoliciesId = '{{ endpointPoliciesId }}' --required;