REST Resource: projects.locations.extensionBindings

Resource: ExtensionBinding

ExtensionBinding is a resource representing the attachment of an extension to a service.

JSON representation
{
  "name": string,
  "createTime": string,
  "updateTime": string,
  "description": string,
  "labels": {
    string: string,
    ...
  },
  "etag": string,
  "producerExtension": string,
  "target": {
    object (Target)
  },
  "matchConditions": [
    {
      object (MatchCondition)
    }
  ],
  "failOpen": boolean,
  "producerMetadata": {
    string: string,
    ...
  }
}
Fields
name

string

Identifier. Name of the ExtensionBinding resource in the following format: projects/{project}/locations/{location}/extensionBindings/{extensionBinding}.

createTime

string (Timestamp format)

Output only. The timestamp when the resource was created.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

updateTime

string (Timestamp format)

Output only. The timestamp when the resource was updated.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

description

string

Optional. A human-readable description of the resource.

labels

map (key: string, value: string)

Optional. Set of labels associated with the ExtensionBinding resource.

The format must comply with the following requirements.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

etag

string

Optional. Etag of the resource. If provided, it must match the server's etag. If the provided etag does not match the server's etag, the request will fail with a 409 ABORTED error.

producerExtension

string

Required. The name of the extension that this binding should attach to target resources.

Format:

  • For Google-provided extensions, specify the service endpoint, for example modelarmor.us-central1.rep.googleapis.com.
target

object (Target)

Required. Specifies a target to which this ExtensionBinding should be attached.

matchConditions[]

object (MatchCondition)

Optional. A list of match conditions to evaluate against the incoming request. The extension is invoked if the request matches at least one condition, or if no match conditions are specified. A request matches a condition only if it matches every field that is set in that condition.

Limited to 5 conditions.

failOpen

boolean

Optional. Determines the behavior of the extension binding when the call to the extension fails or times out. Default value is false.

When set to true, failures of the extension are silently ignored.

producerMetadata

map (key: string, value: string)

Optional. Additional metadata that should be passed to the attached extension with each request.

This field is subject to the following limitations:

  • The total size of the metadata must be less than 1 KiB.
  • The total number of keys must be less than 16.
  • The length of each key must be less than 64 characters.
  • The length of each value must be less than 1024 characters.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

Target

Specifies a list of targets to which this ExtensionBinding should attach.

JSON representation
{
  "resources": [
    string
  ],
  "scope": {
    object (Scope)
  }
}
Fields
resources[]

string

Optional. The references to the target resources to which this binding should attach. Exactly one of resources or scope must be set.

For AI Application resources, specify the full resource name in the format: projects/{project}/locations/{location}/applications/{application}.

Limited to 1 resource.

scope

object (Scope)

Optional. Specifies the scope of resources to which this binding should attach. Exactly one of resources or scope must be set.

Scope

Specifies the scope of resources to which this binding should attach.

JSON representation
{
  "parent": string,
  "resourceTypes": [
    enum (ResourceType)
  ]
}
Fields
parent

string

Required. The parent resource that defines the scope, in the format projects/{project_number}.

When the scope is a project, the binding applies to the resources that meet all of the following conditions:

  • The resource belongs to the specified project.
  • The resource is in the same location as the ExtensionBinding.
  • The resource type is listed in resourceTypes.
resourceTypes[]

enum (ResourceType)

Required. The types of resources to which the binding should attach. Limited to 1 resource type.

ResourceType

Resource types that should be targeted by the binding.

Enums
RESOURCE_TYPE_UNSPECIFIED Default value. Should not be used.
AI_APPLICATION AI Application resources.
AGENT_GATEWAY Agent Gateway resources.

MatchCondition

Conditions to match against the incoming request.

JSON representation
{
  "to": {
    object (To)
  }
}
Fields
to

object (To)

Optional. Describes properties of a destination of a request. If specified, the extension will only be invoked on requests to destinations that match the specified criteria.

To

Describes properties of one or more destinations of a request.

JSON representation
{
  "destination": {
    object (Destination)
  },
  "notDestination": {
    object (Destination)
  }
}
Fields
destination

object (Destination)

Optional. Describes properties of the destination of a request. A request matches the destination only if it matches every field that is set. Fields that are not set are always considered a match.

For example, if only hosts and paths are set, a request matches when any host matches and any path matches.

At least one of destination or notDestination must be specified.

notDestination

object (Destination)

Optional. Describes the negated properties of the request destination. The extension will not be invoked on requests that match the criteria specified in this field. At least one of destination or notDestination must be specified.

Destination

Describes properties of a single destination.

JSON representation
{
  "headerSet": {
    object (HeaderSet)
  },
  "resources": [
    {
      object (StringMatch)
    }
  ],
  "hosts": [
    {
      object (StringMatch)
    }
  ],
  "paths": [
    {
      object (StringMatch)
    }
  ]
}
Fields
headerSet

object (HeaderSet)

Optional. A set of HTTP headers to match against. If not specified, requests with any headers are matched.

resources[]

object (StringMatch)

Optional. A list of non-empty strings whose value is matched against the resource to which a request is sent (for example, an Agent in AiApplication). If not specified, any resource is allowed. If specified, a match occurs if any of the resources matches the resource value in the request. Limited to 5 resources. When matching against resources in the Agent Registry, use the URNs of the registry resources.

hosts[]

object (StringMatch)

Optional. A list of HTTP hosts to match against. Limited to 10 hosts. If not specified, any host is allowed. If specified, a match occurs if any of the hosts matches the host value in the request.

paths[]

object (StringMatch)

Optional. A list of paths to match against. Limited to 10 paths. If not specified, any path is allowed.

Note that this path match includes the query parameters. For gRPC services, this should be a fully-qualified name of the form /package.service/method.

HeaderSet

Describes a set of HTTP headers to match against.

JSON representation
{
  "headers": [
    {
      object (HeaderMatch)
    }
  ]
}
Fields
headers[]

object (HeaderMatch)

Required. A list of HTTP headers to match against. If multiple header matches are provided, they are evaluated as an AND, meaning that all header matches must match for the request to match. Limited to 10 headers.

HeaderMatch

Determines how an HTTP header should be matched.

JSON representation
{
  "name": string,
  "value": {
    object (StringMatch)
  }
}
Fields
name

string

Required. Specifies the name of the header in the request.

value

object (StringMatch)

Optional. Specifies how the header match will be performed.

StringMatch

Specifies matching logic for string values.

JSON representation
{
  "ignoreCase": boolean,

  // The following is a list of mutually exclusive fields. At most one of the
  // fields will be set in a response:
  "exact": string,
  "prefix": string,
  "suffix": string,
  "contains": string
  // End of mutually exclusive fields.
}
Fields
ignoreCase

boolean

Optional. If true, the exact, prefix, suffix, or contains match is case insensitive. For example, the matcher data matches both Data and data when set to true.

Determines how a string value should be matched against the pattern. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response:
exact

string

Optional. The input string must match exactly the string specified here.

Examples:

  • abc matches only the value abc.
prefix

string

Optional. The input string must have the prefix specified here. An empty prefix is not allowed.

Examples:

  • abc matches the value abc.xyz.
suffix

string

Optional. The input string must have the suffix specified here. An empty suffix is not allowed.

Examples:

  • abc matches the value xyz.abc.
contains

string

Optional. The input string must contain the substring specified here. An empty substring is not allowed.

Examples:

  • abc matches the value xyz.abc.def.
End of mutually exclusive fields.

Methods

create

Creates a new ExtensionBinding resource in a given project and location.

delete

Deletes the specified ExtensionBinding resource.

get

Gets details of the specified ExtensionBinding resource.

list

Lists ExtensionBinding resources in a given project and location.

patch

Updates the parameters of the specified ExtensionBinding resource.