1<html><body> 2<style> 3 4body, h1, h2, h3, div, span, p, pre, a { 5 margin: 0; 6 padding: 0; 7 border: 0; 8 font-weight: inherit; 9 font-style: inherit; 10 font-size: 100%; 11 font-family: inherit; 12 vertical-align: baseline; 13} 14 15body { 16 font-size: 13px; 17 padding: 1em; 18} 19 20h1 { 21 font-size: 26px; 22 margin-bottom: 1em; 23} 24 25h2 { 26 font-size: 24px; 27 margin-bottom: 1em; 28} 29 30h3 { 31 font-size: 20px; 32 margin-bottom: 1em; 33 margin-top: 1em; 34} 35 36pre, code { 37 line-height: 1.5; 38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; 39} 40 41pre { 42 margin-top: 0.5em; 43} 44 45h1, h2, h3, p { 46 font-family: Arial, sans serif; 47} 48 49h1, h2, h3 { 50 border-bottom: solid #CCC 1px; 51} 52 53.toc_element { 54 margin-top: 0.5em; 55} 56 57.firstline { 58 margin-left: 2 em; 59} 60 61.method { 62 margin-top: 1em; 63 border: solid 1px #CCC; 64 padding: 1em; 65 background: #EEE; 66} 67 68.details { 69 font-weight: bold; 70 font-size: 14px; 71} 72 73</style> 74 75<h1><a href="compute_v1.html">Compute Engine API</a> . <a href="compute_v1.globalForwardingRules.html">globalForwardingRules</a></h1> 76<h2>Instance Methods</h2> 77<p class="toc_element"> 78 <code><a href="#delete">delete(project, forwardingRule, requestId=None)</a></code></p> 79<p class="firstline">Deletes the specified GlobalForwardingRule resource.</p> 80<p class="toc_element"> 81 <code><a href="#get">get(project, forwardingRule)</a></code></p> 82<p class="firstline">Returns the specified GlobalForwardingRule resource. Gets a list of available forwarding rules by making a list() request.</p> 83<p class="toc_element"> 84 <code><a href="#insert">insert(project, body, requestId=None)</a></code></p> 85<p class="firstline">Creates a GlobalForwardingRule resource in the specified project using the data included in the request.</p> 86<p class="toc_element"> 87 <code><a href="#list">list(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p> 88<p class="firstline">Retrieves a list of GlobalForwardingRule resources available to the specified project.</p> 89<p class="toc_element"> 90 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p> 91<p class="firstline">Retrieves the next page of results.</p> 92<p class="toc_element"> 93 <code><a href="#setTarget">setTarget(project, forwardingRule, body, requestId=None)</a></code></p> 94<p class="firstline">Changes target URL for the GlobalForwardingRule resource. The new target should be of the same type as the old target.</p> 95<h3>Method Details</h3> 96<div class="method"> 97 <code class="details" id="delete">delete(project, forwardingRule, requestId=None)</code> 98 <pre>Deletes the specified GlobalForwardingRule resource. 99 100Args: 101 project: string, Project ID for this request. (required) 102 forwardingRule: string, Name of the ForwardingRule resource to delete. (required) 103 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 104 105For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. 106 107The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). 108 109Returns: 110 An object of the form: 111 112 { # Represents an Operation resource. 113 # 114 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. 115 # 116 # Operations can be global, regional or zonal. 117 # - For global operations, use the globalOperations resource. 118 # - For regional operations, use the regionOperations resource. 119 # - For zonal operations, use the zonalOperations resource. 120 # 121 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==) 122 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 123 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 124 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 125 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 126 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 127 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 128 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. 129 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. 130 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses. 131 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found. 132 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 133 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. 134 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 135 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 136 { 137 "message": "A String", # [Output Only] A human-readable description of the warning code. 138 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. 139 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 140 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 141 { 142 "value": "A String", # [Output Only] A warning data value corresponding to the key. 143 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding). 144 }, 145 ], 146 }, 147 ], 148 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com. 149 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 150 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. 151 "name": "A String", # [Output Only] Name of the resource. 152 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 153 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 154 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 155 { 156 "message": "A String", # [Output Only] An optional, human-readable error message. 157 "code": "A String", # [Output Only] The error type identifier for this error. 158 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 159 }, 160 ], 161 }, 162 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 163 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 164 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from. 165 }</pre> 166</div> 167 168<div class="method"> 169 <code class="details" id="get">get(project, forwardingRule)</code> 170 <pre>Returns the specified GlobalForwardingRule resource. Gets a list of available forwarding rules by making a list() request. 171 172Args: 173 project: string, Project ID for this request. (required) 174 forwardingRule: string, Name of the ForwardingRule resource to return. (required) 175 176Returns: 177 An object of the form: 178 179 { # A ForwardingRule resource. A ForwardingRule resource specifies which pool of target virtual machines to forward a packet to if it matches the given [IPAddress, IPProtocol, ports] tuple. (== resource_for beta.forwardingRules ==) (== resource_for v1.forwardingRules ==) (== resource_for beta.globalForwardingRules ==) (== resource_for v1.globalForwardingRules ==) (== resource_for beta.regionForwardingRules ==) (== resource_for v1.regionForwardingRules ==) 180 "kind": "compute#forwardingRule", # [Output Only] Type of the resource. Always compute#forwardingRule for Forwarding Rule resources. 181 "target": "A String", # The URL of the target resource to receive the matched traffic. For regional forwarding rules, this target must live in the same region as the forwarding rule. For global forwarding rules, this target must be a global load balancing resource. The forwarded traffic must be of a type appropriate to the target object. For INTERNAL_SELF_MANAGED load balancing, only HTTP and HTTPS targets are valid. 182 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 183 "serviceName": "A String", # [Output Only] The internal fully qualified service name for this Forwarding Rule. 184 # 185 # This field is only used for internal load balancing. 186 "networkTier": "A String", # This signifies the networking tier used for configuring this load balancer and can only take the following values: PREMIUM , STANDARD. 187 # 188 # For regional ForwardingRule, the valid values are PREMIUM and STANDARD. For GlobalForwardingRule, the valid value is PREMIUM. 189 # 190 # If this field is not specified, it is assumed to be PREMIUM. If IPAddress is specified, this value must be equal to the networkTier of the Address. 191 "IPAddress": "A String", # The IP address that this forwarding rule is serving on behalf of. 192 # 193 # Addresses are restricted based on the forwarding rule's load balancing scheme (EXTERNAL or INTERNAL) and scope (global or regional). 194 # 195 # When the load balancing scheme is EXTERNAL, for global forwarding rules, the address must be a global IP, and for regional forwarding rules, the address must live in the same region as the forwarding rule. If this field is empty, an ephemeral IPv4 address from the same scope (global or regional) will be assigned. A regional forwarding rule supports IPv4 only. A global forwarding rule supports either IPv4 or IPv6. 196 # 197 # When the load balancing scheme is INTERNAL_SELF_MANAGED, this must be a URL reference to an existing Address resource ( internal regional static IP address), with a purpose of GCE_END_POINT and address_type of INTERNAL. 198 # 199 # When the load balancing scheme is INTERNAL, this can only be an RFC 1918 IP address belonging to the network/subnet configured for the forwarding rule. By default, if this field is empty, an ephemeral internal IP address will be automatically allocated from the IP range of the subnet or network configured for this forwarding rule. 200 # 201 # An address can be specified either by a literal IP address or a URL reference to an existing Address resource. The following examples are all valid: 202 # - 100.1.2.3 203 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/addresses/address 204 # - projects/project/regions/region/addresses/address 205 # - regions/region/addresses/address 206 # - global/addresses/address 207 # - address 208 "region": "A String", # [Output Only] URL of the region where the regional forwarding rule resides. This field is not applicable to global forwarding rules. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body. 209 "allPorts": True or False, # This field is used along with the backend_service field for internal load balancing or with the target field for internal TargetInstance. This field cannot be used with port or portRange fields. 210 # 211 # When the load balancing scheme is INTERNAL and protocol is TCP/UDP, specify this field to allow packets addressed to any ports will be forwarded to the backends configured with this forwarding rule. 212 "ports": [ # This field is used along with the backend_service field for internal load balancing. 213 # 214 # When the load balancing scheme is INTERNAL, a list of ports can be configured, for example, ['80'], ['8000','9000'] etc. Only packets addressed to these ports will be forwarded to the backends configured with this forwarding rule. 215 # 216 # You may specify a maximum of up to 5 ports. 217 "A String", 218 ], 219 "ipVersion": "A String", # The IP Version that will be used by this forwarding rule. Valid options are IPV4 or IPV6. This can only be specified for an external global forwarding rule. 220 "network": "A String", # This field is not used for external load balancing. 221 # 222 # For INTERNAL and INTERNAL_SELF_MANAGED load balancing, this field identifies the network that the load balanced IP should belong to for this Forwarding Rule. If this field is not specified, the default network will be used. 223 "loadBalancingScheme": "A String", # This signifies what the ForwardingRule will be used for and can only take the following values: INTERNAL, INTERNAL_SELF_MANAGED, EXTERNAL. The value of INTERNAL means that this will be used for Internal Network Load Balancing (TCP, UDP). The value of INTERNAL_SELF_MANAGED means that this will be used for Internal Global HTTP(S) LB. The value of EXTERNAL means that this will be used for External Load Balancing (HTTP(S) LB, External TCP/UDP LB, SSL Proxy) 224 "serviceLabel": "A String", # An optional prefix to the service name for this Forwarding Rule. If specified, will be the first label of the fully qualified service name. 225 # 226 # The label must be 1-63 characters long, and comply with RFC1035. Specifically, the label must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. 227 # 228 # This field is only used for internal load balancing. 229 "portRange": "A String", # This field is used along with the target field for TargetHttpProxy, TargetHttpsProxy, TargetSslProxy, TargetTcpProxy, TargetVpnGateway, TargetPool, TargetInstance. 230 # 231 # Applicable only when IPProtocol is TCP, UDP, or SCTP, only packets addressed to ports in the specified range will be forwarded to target. Forwarding rules with the same [IPAddress, IPProtocol] pair must have disjoint port ranges. 232 # 233 # Some types of forwarding target have constraints on the acceptable ports: 234 # - TargetHttpProxy: 80, 8080 235 # - TargetHttpsProxy: 443 236 # - TargetTcpProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, 995, 1688, 1883, 5222 237 # - TargetSslProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, 995, 1688, 1883, 5222 238 # - TargetVpnGateway: 500, 4500 239 "backendService": "A String", # This field is only used for INTERNAL load balancing. 240 # 241 # For internal load balancing, this field identifies the BackendService resource to receive the matched traffic. 242 "IPProtocol": "A String", # The IP protocol to which this rule applies. Valid options are TCP, UDP, ESP, AH, SCTP or ICMP. 243 # 244 # When the load balancing scheme is INTERNAL, only TCP and UDP are valid. When the load balancing scheme is INTERNAL_SELF_MANAGED, only TCPis valid. 245 "subnetwork": "A String", # This field is only used for INTERNAL load balancing. 246 # 247 # For internal load balancing, this field identifies the subnetwork that the load balanced IP should belong to for this Forwarding Rule. 248 # 249 # If the network specified is in auto subnet mode, this field is optional. However, if the network is in custom subnet mode, a subnetwork must be specified. 250 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. 251 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 252 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 253 "name": "A String", # Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. 254 }</pre> 255</div> 256 257<div class="method"> 258 <code class="details" id="insert">insert(project, body, requestId=None)</code> 259 <pre>Creates a GlobalForwardingRule resource in the specified project using the data included in the request. 260 261Args: 262 project: string, Project ID for this request. (required) 263 body: object, The request body. (required) 264 The object takes the form of: 265 266{ # A ForwardingRule resource. A ForwardingRule resource specifies which pool of target virtual machines to forward a packet to if it matches the given [IPAddress, IPProtocol, ports] tuple. (== resource_for beta.forwardingRules ==) (== resource_for v1.forwardingRules ==) (== resource_for beta.globalForwardingRules ==) (== resource_for v1.globalForwardingRules ==) (== resource_for beta.regionForwardingRules ==) (== resource_for v1.regionForwardingRules ==) 267 "kind": "compute#forwardingRule", # [Output Only] Type of the resource. Always compute#forwardingRule for Forwarding Rule resources. 268 "target": "A String", # The URL of the target resource to receive the matched traffic. For regional forwarding rules, this target must live in the same region as the forwarding rule. For global forwarding rules, this target must be a global load balancing resource. The forwarded traffic must be of a type appropriate to the target object. For INTERNAL_SELF_MANAGED load balancing, only HTTP and HTTPS targets are valid. 269 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 270 "serviceName": "A String", # [Output Only] The internal fully qualified service name for this Forwarding Rule. 271 # 272 # This field is only used for internal load balancing. 273 "networkTier": "A String", # This signifies the networking tier used for configuring this load balancer and can only take the following values: PREMIUM , STANDARD. 274 # 275 # For regional ForwardingRule, the valid values are PREMIUM and STANDARD. For GlobalForwardingRule, the valid value is PREMIUM. 276 # 277 # If this field is not specified, it is assumed to be PREMIUM. If IPAddress is specified, this value must be equal to the networkTier of the Address. 278 "IPAddress": "A String", # The IP address that this forwarding rule is serving on behalf of. 279 # 280 # Addresses are restricted based on the forwarding rule's load balancing scheme (EXTERNAL or INTERNAL) and scope (global or regional). 281 # 282 # When the load balancing scheme is EXTERNAL, for global forwarding rules, the address must be a global IP, and for regional forwarding rules, the address must live in the same region as the forwarding rule. If this field is empty, an ephemeral IPv4 address from the same scope (global or regional) will be assigned. A regional forwarding rule supports IPv4 only. A global forwarding rule supports either IPv4 or IPv6. 283 # 284 # When the load balancing scheme is INTERNAL_SELF_MANAGED, this must be a URL reference to an existing Address resource ( internal regional static IP address), with a purpose of GCE_END_POINT and address_type of INTERNAL. 285 # 286 # When the load balancing scheme is INTERNAL, this can only be an RFC 1918 IP address belonging to the network/subnet configured for the forwarding rule. By default, if this field is empty, an ephemeral internal IP address will be automatically allocated from the IP range of the subnet or network configured for this forwarding rule. 287 # 288 # An address can be specified either by a literal IP address or a URL reference to an existing Address resource. The following examples are all valid: 289 # - 100.1.2.3 290 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/addresses/address 291 # - projects/project/regions/region/addresses/address 292 # - regions/region/addresses/address 293 # - global/addresses/address 294 # - address 295 "region": "A String", # [Output Only] URL of the region where the regional forwarding rule resides. This field is not applicable to global forwarding rules. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body. 296 "allPorts": True or False, # This field is used along with the backend_service field for internal load balancing or with the target field for internal TargetInstance. This field cannot be used with port or portRange fields. 297 # 298 # When the load balancing scheme is INTERNAL and protocol is TCP/UDP, specify this field to allow packets addressed to any ports will be forwarded to the backends configured with this forwarding rule. 299 "ports": [ # This field is used along with the backend_service field for internal load balancing. 300 # 301 # When the load balancing scheme is INTERNAL, a list of ports can be configured, for example, ['80'], ['8000','9000'] etc. Only packets addressed to these ports will be forwarded to the backends configured with this forwarding rule. 302 # 303 # You may specify a maximum of up to 5 ports. 304 "A String", 305 ], 306 "ipVersion": "A String", # The IP Version that will be used by this forwarding rule. Valid options are IPV4 or IPV6. This can only be specified for an external global forwarding rule. 307 "network": "A String", # This field is not used for external load balancing. 308 # 309 # For INTERNAL and INTERNAL_SELF_MANAGED load balancing, this field identifies the network that the load balanced IP should belong to for this Forwarding Rule. If this field is not specified, the default network will be used. 310 "loadBalancingScheme": "A String", # This signifies what the ForwardingRule will be used for and can only take the following values: INTERNAL, INTERNAL_SELF_MANAGED, EXTERNAL. The value of INTERNAL means that this will be used for Internal Network Load Balancing (TCP, UDP). The value of INTERNAL_SELF_MANAGED means that this will be used for Internal Global HTTP(S) LB. The value of EXTERNAL means that this will be used for External Load Balancing (HTTP(S) LB, External TCP/UDP LB, SSL Proxy) 311 "serviceLabel": "A String", # An optional prefix to the service name for this Forwarding Rule. If specified, will be the first label of the fully qualified service name. 312 # 313 # The label must be 1-63 characters long, and comply with RFC1035. Specifically, the label must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. 314 # 315 # This field is only used for internal load balancing. 316 "portRange": "A String", # This field is used along with the target field for TargetHttpProxy, TargetHttpsProxy, TargetSslProxy, TargetTcpProxy, TargetVpnGateway, TargetPool, TargetInstance. 317 # 318 # Applicable only when IPProtocol is TCP, UDP, or SCTP, only packets addressed to ports in the specified range will be forwarded to target. Forwarding rules with the same [IPAddress, IPProtocol] pair must have disjoint port ranges. 319 # 320 # Some types of forwarding target have constraints on the acceptable ports: 321 # - TargetHttpProxy: 80, 8080 322 # - TargetHttpsProxy: 443 323 # - TargetTcpProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, 995, 1688, 1883, 5222 324 # - TargetSslProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, 995, 1688, 1883, 5222 325 # - TargetVpnGateway: 500, 4500 326 "backendService": "A String", # This field is only used for INTERNAL load balancing. 327 # 328 # For internal load balancing, this field identifies the BackendService resource to receive the matched traffic. 329 "IPProtocol": "A String", # The IP protocol to which this rule applies. Valid options are TCP, UDP, ESP, AH, SCTP or ICMP. 330 # 331 # When the load balancing scheme is INTERNAL, only TCP and UDP are valid. When the load balancing scheme is INTERNAL_SELF_MANAGED, only TCPis valid. 332 "subnetwork": "A String", # This field is only used for INTERNAL load balancing. 333 # 334 # For internal load balancing, this field identifies the subnetwork that the load balanced IP should belong to for this Forwarding Rule. 335 # 336 # If the network specified is in auto subnet mode, this field is optional. However, if the network is in custom subnet mode, a subnetwork must be specified. 337 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. 338 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 339 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 340 "name": "A String", # Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. 341 } 342 343 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 344 345For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. 346 347The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). 348 349Returns: 350 An object of the form: 351 352 { # Represents an Operation resource. 353 # 354 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. 355 # 356 # Operations can be global, regional or zonal. 357 # - For global operations, use the globalOperations resource. 358 # - For regional operations, use the regionOperations resource. 359 # - For zonal operations, use the zonalOperations resource. 360 # 361 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==) 362 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 363 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 364 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 365 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 366 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 367 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 368 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. 369 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. 370 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses. 371 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found. 372 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 373 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. 374 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 375 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 376 { 377 "message": "A String", # [Output Only] A human-readable description of the warning code. 378 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. 379 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 380 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 381 { 382 "value": "A String", # [Output Only] A warning data value corresponding to the key. 383 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding). 384 }, 385 ], 386 }, 387 ], 388 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com. 389 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 390 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. 391 "name": "A String", # [Output Only] Name of the resource. 392 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 393 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 394 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 395 { 396 "message": "A String", # [Output Only] An optional, human-readable error message. 397 "code": "A String", # [Output Only] The error type identifier for this error. 398 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 399 }, 400 ], 401 }, 402 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 403 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 404 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from. 405 }</pre> 406</div> 407 408<div class="method"> 409 <code class="details" id="list">list(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</code> 410 <pre>Retrieves a list of GlobalForwardingRule resources available to the specified project. 411 412Args: 413 project: string, Project ID for this request. (required) 414 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. 415 416You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. 417 418Currently, only sorting by name or creationTimestamp desc is supported. 419 maxResults: integer, The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) 420 pageToken: string, Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results. 421 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <. 422 423For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance. 424 425You can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. 426 427To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true). 428 429Returns: 430 An object of the form: 431 432 { # Contains a list of ForwardingRule resources. 433 "nextPageToken": "A String", # [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. 434 "kind": "compute#forwardingRuleList", # Type of resource. 435 "items": [ # A list of ForwardingRule resources. 436 { # A ForwardingRule resource. A ForwardingRule resource specifies which pool of target virtual machines to forward a packet to if it matches the given [IPAddress, IPProtocol, ports] tuple. (== resource_for beta.forwardingRules ==) (== resource_for v1.forwardingRules ==) (== resource_for beta.globalForwardingRules ==) (== resource_for v1.globalForwardingRules ==) (== resource_for beta.regionForwardingRules ==) (== resource_for v1.regionForwardingRules ==) 437 "kind": "compute#forwardingRule", # [Output Only] Type of the resource. Always compute#forwardingRule for Forwarding Rule resources. 438 "target": "A String", # The URL of the target resource to receive the matched traffic. For regional forwarding rules, this target must live in the same region as the forwarding rule. For global forwarding rules, this target must be a global load balancing resource. The forwarded traffic must be of a type appropriate to the target object. For INTERNAL_SELF_MANAGED load balancing, only HTTP and HTTPS targets are valid. 439 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 440 "serviceName": "A String", # [Output Only] The internal fully qualified service name for this Forwarding Rule. 441 # 442 # This field is only used for internal load balancing. 443 "networkTier": "A String", # This signifies the networking tier used for configuring this load balancer and can only take the following values: PREMIUM , STANDARD. 444 # 445 # For regional ForwardingRule, the valid values are PREMIUM and STANDARD. For GlobalForwardingRule, the valid value is PREMIUM. 446 # 447 # If this field is not specified, it is assumed to be PREMIUM. If IPAddress is specified, this value must be equal to the networkTier of the Address. 448 "IPAddress": "A String", # The IP address that this forwarding rule is serving on behalf of. 449 # 450 # Addresses are restricted based on the forwarding rule's load balancing scheme (EXTERNAL or INTERNAL) and scope (global or regional). 451 # 452 # When the load balancing scheme is EXTERNAL, for global forwarding rules, the address must be a global IP, and for regional forwarding rules, the address must live in the same region as the forwarding rule. If this field is empty, an ephemeral IPv4 address from the same scope (global or regional) will be assigned. A regional forwarding rule supports IPv4 only. A global forwarding rule supports either IPv4 or IPv6. 453 # 454 # When the load balancing scheme is INTERNAL_SELF_MANAGED, this must be a URL reference to an existing Address resource ( internal regional static IP address), with a purpose of GCE_END_POINT and address_type of INTERNAL. 455 # 456 # When the load balancing scheme is INTERNAL, this can only be an RFC 1918 IP address belonging to the network/subnet configured for the forwarding rule. By default, if this field is empty, an ephemeral internal IP address will be automatically allocated from the IP range of the subnet or network configured for this forwarding rule. 457 # 458 # An address can be specified either by a literal IP address or a URL reference to an existing Address resource. The following examples are all valid: 459 # - 100.1.2.3 460 # - https://www.googleapis.com/compute/v1/projects/project/regions/region/addresses/address 461 # - projects/project/regions/region/addresses/address 462 # - regions/region/addresses/address 463 # - global/addresses/address 464 # - address 465 "region": "A String", # [Output Only] URL of the region where the regional forwarding rule resides. This field is not applicable to global forwarding rules. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body. 466 "allPorts": True or False, # This field is used along with the backend_service field for internal load balancing or with the target field for internal TargetInstance. This field cannot be used with port or portRange fields. 467 # 468 # When the load balancing scheme is INTERNAL and protocol is TCP/UDP, specify this field to allow packets addressed to any ports will be forwarded to the backends configured with this forwarding rule. 469 "ports": [ # This field is used along with the backend_service field for internal load balancing. 470 # 471 # When the load balancing scheme is INTERNAL, a list of ports can be configured, for example, ['80'], ['8000','9000'] etc. Only packets addressed to these ports will be forwarded to the backends configured with this forwarding rule. 472 # 473 # You may specify a maximum of up to 5 ports. 474 "A String", 475 ], 476 "ipVersion": "A String", # The IP Version that will be used by this forwarding rule. Valid options are IPV4 or IPV6. This can only be specified for an external global forwarding rule. 477 "network": "A String", # This field is not used for external load balancing. 478 # 479 # For INTERNAL and INTERNAL_SELF_MANAGED load balancing, this field identifies the network that the load balanced IP should belong to for this Forwarding Rule. If this field is not specified, the default network will be used. 480 "loadBalancingScheme": "A String", # This signifies what the ForwardingRule will be used for and can only take the following values: INTERNAL, INTERNAL_SELF_MANAGED, EXTERNAL. The value of INTERNAL means that this will be used for Internal Network Load Balancing (TCP, UDP). The value of INTERNAL_SELF_MANAGED means that this will be used for Internal Global HTTP(S) LB. The value of EXTERNAL means that this will be used for External Load Balancing (HTTP(S) LB, External TCP/UDP LB, SSL Proxy) 481 "serviceLabel": "A String", # An optional prefix to the service name for this Forwarding Rule. If specified, will be the first label of the fully qualified service name. 482 # 483 # The label must be 1-63 characters long, and comply with RFC1035. Specifically, the label must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. 484 # 485 # This field is only used for internal load balancing. 486 "portRange": "A String", # This field is used along with the target field for TargetHttpProxy, TargetHttpsProxy, TargetSslProxy, TargetTcpProxy, TargetVpnGateway, TargetPool, TargetInstance. 487 # 488 # Applicable only when IPProtocol is TCP, UDP, or SCTP, only packets addressed to ports in the specified range will be forwarded to target. Forwarding rules with the same [IPAddress, IPProtocol] pair must have disjoint port ranges. 489 # 490 # Some types of forwarding target have constraints on the acceptable ports: 491 # - TargetHttpProxy: 80, 8080 492 # - TargetHttpsProxy: 443 493 # - TargetTcpProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, 995, 1688, 1883, 5222 494 # - TargetSslProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, 995, 1688, 1883, 5222 495 # - TargetVpnGateway: 500, 4500 496 "backendService": "A String", # This field is only used for INTERNAL load balancing. 497 # 498 # For internal load balancing, this field identifies the BackendService resource to receive the matched traffic. 499 "IPProtocol": "A String", # The IP protocol to which this rule applies. Valid options are TCP, UDP, ESP, AH, SCTP or ICMP. 500 # 501 # When the load balancing scheme is INTERNAL, only TCP and UDP are valid. When the load balancing scheme is INTERNAL_SELF_MANAGED, only TCPis valid. 502 "subnetwork": "A String", # This field is only used for INTERNAL load balancing. 503 # 504 # For internal load balancing, this field identifies the subnetwork that the load balanced IP should belong to for this Forwarding Rule. 505 # 506 # If the network specified is in auto subnet mode, this field is optional. However, if the network is in custom subnet mode, a subnetwork must be specified. 507 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. 508 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 509 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 510 "name": "A String", # Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. 511 }, 512 ], 513 "warning": { # [Output Only] Informational warning message. 514 "message": "A String", # [Output Only] A human-readable description of the warning code. 515 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. 516 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 517 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 518 { 519 "value": "A String", # [Output Only] A warning data value corresponding to the key. 520 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding). 521 }, 522 ], 523 }, 524 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server. 525 "selfLink": "A String", # [Output Only] Server-defined URL for this resource. 526 }</pre> 527</div> 528 529<div class="method"> 530 <code class="details" id="list_next">list_next(previous_request, previous_response)</code> 531 <pre>Retrieves the next page of results. 532 533Args: 534 previous_request: The request for the previous page. (required) 535 previous_response: The response from the request for the previous page. (required) 536 537Returns: 538 A request object that you can call 'execute()' on to request the next 539 page. Returns None if there are no more items in the collection. 540 </pre> 541</div> 542 543<div class="method"> 544 <code class="details" id="setTarget">setTarget(project, forwardingRule, body, requestId=None)</code> 545 <pre>Changes target URL for the GlobalForwardingRule resource. The new target should be of the same type as the old target. 546 547Args: 548 project: string, Project ID for this request. (required) 549 forwardingRule: string, Name of the ForwardingRule resource in which target is to be set. (required) 550 body: object, The request body. (required) 551 The object takes the form of: 552 553{ 554 "target": "A String", 555 } 556 557 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 558 559For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. 560 561The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). 562 563Returns: 564 An object of the form: 565 566 { # Represents an Operation resource. 567 # 568 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. 569 # 570 # Operations can be global, regional or zonal. 571 # - For global operations, use the globalOperations resource. 572 # - For regional operations, use the regionOperations resource. 573 # - For zonal operations, use the zonalOperations resource. 574 # 575 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==) 576 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 577 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise. 578 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 579 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 580 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations. 581 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 582 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. 583 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. 584 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses. 585 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found. 586 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 587 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. 588 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 589 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 590 { 591 "message": "A String", # [Output Only] A human-readable description of the warning code. 592 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. 593 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 594 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 595 { 596 "value": "A String", # [Output Only] A warning data value corresponding to the key. 597 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding). 598 }, 599 ], 600 }, 601 ], 602 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com. 603 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 604 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. 605 "name": "A String", # [Output Only] Name of the resource. 606 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations. 607 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 608 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 609 { 610 "message": "A String", # [Output Only] An optional, human-readable error message. 611 "code": "A String", # [Output Only] The error type identifier for this error. 612 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 613 }, 614 ], 615 }, 616 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 617 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 618 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from. 619 }</pre> 620</div> 621 622</body></html>