endpoint_policies
Creates, updates, deletes, gets or lists a endpoint_policies
resource.
Overview
Name | endpoint_policies |
Type | Resource |
Id | google.networkservices.endpoint_policies |
Fields
Name | Datatype | Description |
---|---|---|
name | string | Identifier. Name of the EndpointPolicy resource. It matches pattern projects/{project}/locations/global/endpointPolicies/{endpoint_policy} . |
description | string | Optional. A free-text description of the resource. Max length 1024 characters. |
authorizationPolicy | string | Optional. 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. |
clientTlsPolicy | string | Optional. 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. |
createTime | string | Output only. The timestamp when the resource was created. |
endpointMatcher | object | A definition of a matcher that selects endpoints to which the policies should be applied. |
labels | object | Optional. Set of label tags associated with the EndpointPolicy resource. |
serverTlsPolicy | string | Optional. 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. |
trafficPortSelector | object | Specification of a port-based selector. |
type | string | Required. The type of endpoint policy. This is primarily used to validate the configuration. |
updateTime | string | Output only. The timestamp when the resource was updated. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | endpointPoliciesId, locationsId, projectsId | Gets details of a single EndpointPolicy. |
list | SELECT | locationsId, projectsId | Lists EndpointPolicies in a given project and location. |
create | INSERT | locationsId, projectsId | Creates a new EndpointPolicy in a given project and location. |
delete | DELETE | endpointPoliciesId, locationsId, projectsId | Deletes a single EndpointPolicy. |
patch | UPDATE | endpointPoliciesId, locationsId, projectsId | Updates the parameters of a single EndpointPolicy. |
SELECT
examples
Lists EndpointPolicies in a given project and location.
SELECT
name,
description,
authorizationPolicy,
clientTlsPolicy,
createTime,
endpointMatcher,
labels,
serverTlsPolicy,
trafficPortSelector,
type,
updateTime
FROM google.networkservices.endpoint_policies
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new endpoint_policies
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.networkservices.endpoint_policies (
locationsId,
projectsId,
name,
labels,
type,
authorizationPolicy,
endpointMatcher,
trafficPortSelector,
description,
serverTlsPolicy,
clientTlsPolicy
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ name }}',
'{{ labels }}',
'{{ type }}',
'{{ authorizationPolicy }}',
'{{ endpointMatcher }}',
'{{ trafficPortSelector }}',
'{{ description }}',
'{{ serverTlsPolicy }}',
'{{ clientTlsPolicy }}'
;
- name: your_resource_model_name
props:
- name: name
value: string
- name: createTime
value: string
- name: updateTime
value: string
- name: labels
value: object
- name: type
value: string
- name: authorizationPolicy
value: string
- name: endpointMatcher
value:
- name: metadataLabelMatcher
value:
- name: metadataLabelMatchCriteria
value: string
- name: metadataLabels
value:
- - name: labelName
value: string
- name: labelValue
value: string
- name: trafficPortSelector
value:
- name: ports
value:
- string
- name: description
value: string
- name: serverTlsPolicy
value: string
- name: clientTlsPolicy
value: string
UPDATE
example
Updates a endpoint_policies
resource.
/*+ update */
UPDATE google.networkservices.endpoint_policies
SET
name = '{{ name }}',
labels = '{{ labels }}',
type = '{{ type }}',
authorizationPolicy = '{{ authorizationPolicy }}',
endpointMatcher = '{{ endpointMatcher }}',
trafficPortSelector = '{{ trafficPortSelector }}',
description = '{{ description }}',
serverTlsPolicy = '{{ serverTlsPolicy }}',
clientTlsPolicy = '{{ clientTlsPolicy }}'
WHERE
endpointPoliciesId = '{{ endpointPoliciesId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';
DELETE
example
Deletes the specified endpoint_policies
resource.
/*+ delete */
DELETE FROM google.networkservices.endpoint_policies
WHERE endpointPoliciesId = '{{ endpointPoliciesId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';