|
| 1 | +# Copyright 2025 Google Inc. |
| 2 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 3 | +# you may not use this file except in compliance with the License. |
| 4 | +# You may obtain a copy of the License at |
| 5 | +# |
| 6 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 7 | +# |
| 8 | +# Unless required by applicable law or agreed to in writing, software |
| 9 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 10 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 11 | +# See the License for the specific language governing permissions and |
| 12 | +# limitations under the License. |
| 13 | + |
| 14 | +--- |
| 15 | +name: 'LbEdgeExtension' |
| 16 | +description: | |
| 17 | + LbEdgeExtension is a resource that lets the extension service influence the selection of backend services and Cloud CDN cache keys by modifying request headers. |
| 18 | +references: |
| 19 | + guides: |
| 20 | + 'Configure a edge extension': 'https://cloud.google.com/service-extensions/docs/configure-edge-extensions' |
| 21 | + api: 'https://cloud.google.com/service-extensions/docs/reference/rest/v1beta1/projects.locations.lbEdgeExtensions' |
| 22 | +docs: |
| 23 | +base_url: 'projects/{{project}}/locations/{{location}}/lbEdgeExtensions' |
| 24 | +self_link: 'projects/{{project}}/locations/{{location}}/lbEdgeExtensions/{{name}}' |
| 25 | +create_url: 'projects/{{project}}/locations/{{location}}/lbEdgeExtensions?lbEdgeExtensionId={{name}}' |
| 26 | +update_verb: 'PATCH' |
| 27 | +update_mask: true |
| 28 | +timeouts: |
| 29 | + insert_minutes: 20 |
| 30 | + update_minutes: 20 |
| 31 | + delete_minutes: 20 |
| 32 | +autogen_async: true |
| 33 | +async: |
| 34 | + actions: ['create', 'delete', 'update'] |
| 35 | + type: 'OpAsync' |
| 36 | + operation: |
| 37 | + base_url: '{{op_id}}' |
| 38 | + result: |
| 39 | + resource_inside_response: false |
| 40 | +custom_code: |
| 41 | +sweeper: |
| 42 | + url_substitutions: |
| 43 | + - location: 'global' |
| 44 | +examples: |
| 45 | + - name: 'network_services_lb_edge_extension_basic' |
| 46 | + primary_resource_id: 'default' |
| 47 | + test_env_vars: |
| 48 | + project: 'PROJECT_NAME' |
| 49 | + vars: |
| 50 | + forwarding_rule_name: 'elb-forwarding-rule' |
| 51 | + target_http_proxy_name: 'elb-target-http-proxy' |
| 52 | + url_map_name: 'elb-url-map' |
| 53 | + backend_service_name: 'elb-backend-subnet' |
| 54 | + lb_edge_extension_name: 'elb-edge-ext' |
| 55 | + wasm_plugin_name: 'elb-wasm-plugin-data' |
| 56 | + repository_name: 'repository-standard' |
| 57 | + exclude_test: true |
| 58 | +parameters: |
| 59 | + - name: 'location' |
| 60 | + type: String |
| 61 | + description: | |
| 62 | + The location of the edge extension |
| 63 | + url_param_only: true |
| 64 | + required: true |
| 65 | + immutable: true |
| 66 | + - name: 'name' |
| 67 | + type: String |
| 68 | + description: | |
| 69 | + Name of the LbEdgeExtension resource in the following format: projects/{project}/locations/{location}/lbEdgeExtensions/{lbEdgeExtensions} |
| 70 | + url_param_only: true |
| 71 | + required: true |
| 72 | + immutable: true |
| 73 | +properties: |
| 74 | + - name: 'description' |
| 75 | + type: String |
| 76 | + description: | |
| 77 | + A human-readable description of the resource. |
| 78 | + - name: 'labels' |
| 79 | + type: KeyValueLabels |
| 80 | + description: 'Set of labels associated with the LbEdgeExtension resource.' |
| 81 | + - name: 'forwardingRules' |
| 82 | + type: Array |
| 83 | + description: | |
| 84 | + A list of references to the forwarding rules to which this service extension is attached. |
| 85 | + At least one forwarding rule is required. Only one LbEdgeExtension resource can be associated with a forwarding rule. |
| 86 | + required: true |
| 87 | + diff_suppress_func: 'tpgresource.ProjectNumberDiffSuppress' |
| 88 | + item_type: |
| 89 | + type: String |
| 90 | + - name: 'extensionChains' |
| 91 | + type: Array |
| 92 | + description: | |
| 93 | + A set of ordered extension chains that contain the match conditions and extensions to execute. |
| 94 | + Match conditions for each extension chain are evaluated in sequence for a given request. |
| 95 | + The first extension chain that has a condition that matches the request is executed. |
| 96 | + Any subsequent extension chains do not execute. Limited to 5 extension chains per resource. |
| 97 | + required: true |
| 98 | + item_type: |
| 99 | + type: NestedObject |
| 100 | + properties: |
| 101 | + - name: 'name' |
| 102 | + type: String |
| 103 | + description: | |
| 104 | + The name for this extension chain. The name is logged as part of the HTTP request logs. |
| 105 | + The name must conform with RFC-1034, is restricted to lower-cased letters, numbers and hyphens, |
| 106 | + and can have a maximum length of 63 characters. Additionally, the first character must be a letter |
| 107 | + and the last character must be a letter or a number. |
| 108 | + required: true |
| 109 | + - name: 'matchCondition' |
| 110 | + type: NestedObject |
| 111 | + description: | |
| 112 | + Conditions under which this chain is invoked for a request. |
| 113 | + required: true |
| 114 | + properties: |
| 115 | + - name: 'celExpression' |
| 116 | + type: String |
| 117 | + description: | |
| 118 | + A Common Expression Language (CEL) expression that is used to match requests for which the extension chain is executed. |
| 119 | + required: true |
| 120 | + - name: 'extensions' |
| 121 | + type: Array |
| 122 | + description: | |
| 123 | + A set of extensions to execute for the matching request. |
| 124 | + At least one extension is required. Up to 3 extensions can be defined for each extension chain for |
| 125 | + LbTrafficExtension resource. LbRouteExtension chains are limited to 1 extension per extension chain. |
| 126 | + required: true |
| 127 | + item_type: |
| 128 | + type: NestedObject |
| 129 | + properties: |
| 130 | + - name: 'name' |
| 131 | + type: String |
| 132 | + description: | |
| 133 | + The name for this extension. The name is logged as part of the HTTP request logs. |
| 134 | + The name must conform with RFC-1034, is restricted to lower-cased letters, numbers and hyphens, |
| 135 | + and can have a maximum length of 63 characters. Additionally, the first character must be a letter |
| 136 | + and the last a letter or a number. |
| 137 | + required: true |
| 138 | + - name: 'service' |
| 139 | + type: String |
| 140 | + description: | |
| 141 | + The reference to the service that runs the extension. |
| 142 | +
|
| 143 | + * To configure a callout extension, service must be a fully-qualified reference to a backend service. |
| 144 | + * To configure a plugin extension, service must be a reference to a WasmPlugin resource. |
| 145 | + required: true |
| 146 | + diff_suppress_func: 'tpgresource.ProjectNumberDiffSuppress' |
| 147 | + - name: 'failOpen' |
| 148 | + type: Boolean |
| 149 | + description: | |
| 150 | + Determines how the proxy behaves if the call to the extension fails or times out. |
| 151 | + When set to TRUE, request or response processing continues without error. |
| 152 | + Any subsequent extensions in the extension chain are also executed. |
| 153 | + When set to FALSE: * If response headers have not been delivered to the downstream client, |
| 154 | + a generic 500 error is returned to the client. The error response can be tailored by |
| 155 | + configuring a custom error response in the load balancer. |
| 156 | + - name: 'supportedEvents' |
| 157 | + type: Array |
| 158 | + description: | |
| 159 | + A set of events during request or response processing for which this extension is called. |
| 160 | + This field is required for the LbEdgeExtension resource and only supports the value `REQUEST_HEADERS`. |
| 161 | + item_type: |
| 162 | + type: String |
| 163 | + min_size: 1 |
| 164 | + - name: 'forwardHeaders' |
| 165 | + type: Array |
| 166 | + description: | |
| 167 | + List of the HTTP headers to forward to the extension (from the client or backend). |
| 168 | + If omitted, all headers are sent. Each element is a string indicating the header name. |
| 169 | + item_type: |
| 170 | + type: String |
| 171 | + - name: 'loadBalancingScheme' |
| 172 | + type: Enum |
| 173 | + description: | |
| 174 | + All forwarding rules referenced by this extension must share the same load balancing scheme. |
| 175 | + required: true |
| 176 | + immutable: true |
| 177 | + enum_values: |
| 178 | + - 'EXTERNAL_MANAGED' |
0 commit comments