- NAME
-
- gcloud beta service-extensions extension-bindings create - create extensionBindings
- SYNOPSIS
-
-
gcloud beta service-extensions extension-bindings create(EXTENSION_BINDING:--location=LOCATION)--producer-extension=PRODUCER_EXTENSION(--target-resources=[TARGET_RESOURCES,…]--scope-parent=SCOPE_PARENT--scope-resource-types=[SCOPE_RESOURCE_TYPES,…]) [--async] [--description=DESCRIPTION] [--etag=ETAG] [--fail-open] [--labels=[LABELS,…]] [--match-conditions=[to=TO]] [--producer-metadata=[PRODUCER_METADATA,…]] [GCLOUD_WIDE_FLAG …]
-
- DESCRIPTION
-
(BETA)Create an extensionBinding - EXAMPLES
-
To create the extensionBinding, run:
gcloud beta service-extensions extension-bindings create - POSITIONAL ARGUMENTS
-
-
ExtensionBinding resource - Identifier. Name of the
ExtensionBindingresource in the following format:projects/{project}/locations/{location}/extensionBindings/{extension_binding}. The arguments in this group can be used to specify the attributes of this resource. (NOTE) Some attributes are not given arguments in this group but can be set in other ways.To set the
projectattribute:-
provide the argument
extension_bindingon the command line with a fully specified name; -
provide the argument
--projecton the command line; -
set the property
core/project.
This must be specified.
EXTENSION_BINDING-
ID of the extensionBinding or fully qualified identifier for the
extensionBinding.
To set the
extension_bindingattribute:-
provide the argument
extension_bindingon the command line.
This positional argument must be specified if any of the other arguments in this group are specified.
-
provide the argument
--location=LOCATION-
The location id of the extensionBinding resource.
To set the
locationattribute:-
provide the argument
extension_bindingon the command line with a fully specified name; -
provide the argument
--locationon the command line.
-
provide the argument
-
provide the argument
-
ExtensionBinding resource - Identifier. Name of the
- REQUIRED FLAGS
-
--producer-extension=PRODUCER_EXTENSION-
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. -
Specifies a list of targets to which this
ExtensionBindingshould attach.At least one of these must be specified:
--target-resources=[TARGET_RESOURCES,…]-
The references to the target resources to which this binding should attach.
Exactly one of
resourcesorscopemust be set.For AI Application resources, specify the full resource name in the format:
projects/{project}/locations/{location}/applications/{application}. Limited to 1 resource. - Specifies the scope of resources to which this binding should attach.
--scope-parent=SCOPE_PARENT-
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
resource_types.
This flag argument must be specified if any of the other arguments in this group are specified.
--scope-resource-types=[SCOPE_RESOURCE_TYPES,…]-
The types of resources to which the binding should attach. Limited to 1 resource
type.
SCOPE_RESOURCE_TYPESmust be one of:agent-gateway- Agent Gateway resources.
ai-application- AI Application resources.
- OPTIONAL FLAGS
-
--async- Return immediately, without waiting for the operation in progress to complete.
--description=DESCRIPTION- A human-readable description of the resource.
--etag=ETAG- 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.
--fail-open-
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. --labels=[LABELS,…]-
Set of labels associated with the
ExtensionBindingresource.The format must comply with the following requirements.
KEY-
Keys must start with a lowercase character and contain only hyphens
(
-), underscores (_), lowercase characters, and numbers. VALUE-
Values must contain only hyphens (
-), underscores (_), lowercase characters, and numbers.
Shorthand Example:--labels=string=string
JSON Example:--labels='{"string": "string"}'
File Example:--labels=path_to_file.(yaml|json)
--match-conditions=[to=TO]-
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.
to-
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.
destination-
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
hostsandpathsare set, a request matches when any host matches and any path matches.At least one of
destinationornot_destinationmust be specified.headerSet-
A set of HTTP headers to match against. If not specified, requests with any
headers are matched.
headers-
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.
name- Specifies the name of the header in the request.
value-
Specifies how the header match will be performed.
contains-
The input string must contain the substring specified here. An empty substring
is not allowed.
Examples:
-
abcmatches the valuexyz.abc.def.
-
exact-
The input string must match exactly the string specified here.
Examples:
-
abconly matches the valueabc.
-
ignoreCase-
If true, the
exact,prefix,suffix, orcontainsmatch is case insensitive. For example, the matcherdatamatches bothDataanddatawhen set to true. prefix-
The input string must have the prefix specified here. An empty prefix is not
allowed.
Examples:
-
abcmatches the valueabc.xyz.
-
suffix-
The input string must have the suffix specified here. An empty suffix is not
allowed.
Examples:
-
abcmatches the valuexyz.abc.
-
hosts-
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.
contains-
The input string must contain the substring specified here. An empty substring
is not allowed.
Examples:
-
abcmatches the valuexyz.abc.def.
-
exact-
The input string must match exactly the string specified here.
Examples:
-
abconly matches the valueabc.
-
ignoreCase-
If true, the
exact,prefix,suffix, orcontainsmatch is case insensitive. For example, the matcherdatamatches bothDataanddatawhen set to true. prefix-
The input string must have the prefix specified here. An empty prefix is not
allowed.
Examples:
-
abcmatches the valueabc.xyz.
-
suffix-
The input string must have the suffix specified here. An empty suffix is not
allowed.
Examples:
-
abcmatches the valuexyz.abc.
-
paths-
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.
contains-
The input string must contain the substring specified here. An empty substring
is not allowed.
Examples:
-
abcmatches the valuexyz.abc.def.
-
exact-
The input string must match exactly the string specified here.
Examples:
-
abconly matches the valueabc.
-
ignoreCase-
If true, the
exact,prefix,suffix, orcontainsmatch is case insensitive. For example, the matcherdatamatches bothDataanddatawhen set to true. prefix-
The input string must have the prefix specified here. An empty prefix is not
allowed.
Examples:
-
abcmatches the valueabc.xyz.
-
suffix-
The input string must have the suffix specified here. An empty suffix is not
allowed.
Examples:
-
abcmatches the valuexyz.abc.
-
resources-
A list of non-empty strings whose value is matched against the resource to which
a request is sent (e.g., 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 AgentRegistry, use the URNs of the registry resources.
contains-
The input string must contain the substring specified here. An empty substring
is not allowed.
Examples:
-
abcmatches the valuexyz.abc.def.
-
exact-
The input string must match exactly the string specified here.
Examples:
-
abconly matches the valueabc.
-
ignoreCase-
If true, the
exact,prefix,suffix, orcontainsmatch is case insensitive. For example, the matcherdatamatches bothDataanddatawhen set to true. prefix-
The input string must have the prefix specified here. An empty prefix is not
allowed.
Examples:
-
abcmatches the valueabc.xyz.
-
suffix-
The input string must have the suffix specified here. An empty suffix is not
allowed.
Examples:
-
abcmatches the valuexyz.abc.
-
notDestination-
Describes the negated properties of the request destination. Extension will not
be invoked on requests that match the criteria specified in this field. At least
one of destination or not_destination must be specified.
headerSet-
A set of HTTP headers to match against. If not specified, requests with any
headers are matched.
headers-
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.
name- Specifies the name of the header in the request.
value-
Specifies how the header match will be performed.
contains-
The input string must contain the substring specified here. An empty substring
is not allowed.
Examples:
-
abcmatches the valuexyz.abc.def.
-
exact-
The input string must match exactly the string specified here.
Examples:
-
abconly matches the valueabc.
-
ignoreCase-
If true, the
exact,prefix,suffix, orcontainsmatch is case insensitive. For example, the matcherdatamatches bothDataanddatawhen set to true. prefix-
The input string must have the prefix specified here. An empty prefix is not
allowed.
Examples:
-
abcmatches the valueabc.xyz.
-
suffix-
The input string must have the suffix specified here. An empty suffix is not
allowed.
Examples:
-
abcmatches the valuexyz.abc.
-
hosts-
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.
contains-
The input string must contain the substring specified here. An empty substring
is not allowed.
Examples:
-
abcmatches the valuexyz.abc.def.
-
exact-
The input string must match exactly the string specified here.
Examples:
-
abconly matches the valueabc.
-
ignoreCase-
If true, the
exact,prefix,suffix, orcontainsmatch is case insensitive. For example, the matcherdatamatches bothDataanddatawhen set to true. prefix-
The input string must have the prefix specified here. An empty prefix is not
allowed.
Examples:
-
abcmatches the valueabc.xyz.
-
suffix-
The input string must have the suffix specified here. An empty suffix is not
allowed.
Examples:
-
abcmatches the valuexyz.abc.
-
paths-
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.
contains-
The input string must contain the substring specified here. An empty substring
is not allowed.
Examples:
-
abcmatches the valuexyz.abc.def.
-
exact-
The input string must match exactly the string specified here.
Examples:
-
abconly matches the valueabc.
-
ignoreCase-
If true, the
exact,prefix,suffix, orcontainsmatch is case insensitive. For example, the matcherdatamatches bothDataanddatawhen set to true. prefix-
The input string must have the prefix specified here. An empty prefix is not
allowed.
Examples:
-
abcmatches the valueabc.xyz.
-
suffix-
The input string must have the suffix specified here. An empty suffix is not
allowed.
Examples:
-
abcmatches the valuexyz.abc.
-
resources-
A list of non-empty strings whose value is matched against the resource to which
a request is sent (e.g., 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 AgentRegistry, use the URNs of the registry resources.
contains-
The input string must contain the substring specified here. An empty substring
is not allowed.
Examples:
-
abcmatches the valuexyz.abc.def.
-
exact-
The input string must match exactly the string specified here.
Examples:
-
abconly matches the valueabc.
-
ignoreCase-
If true, the
exact,prefix,suffix, orcontainsmatch is case insensitive. For example, the matcherdatamatches bothDataanddatawhen set to true. prefix-
The input string must have the prefix specified here. An empty prefix is not
allowed.
Examples:
-
abcmatches the valueabc.xyz.
-
suffix-
The input string must have the suffix specified here. An empty suffix is not
allowed.
Examples:
-
abcmatches the valuexyz.abc.
-
Shorthand Example:--match-conditions=to={destination={headerSet={headers=[{name=string,value={contains=string,exact=string,ignoreCase=boolean,prefix=string,suffix=string}}]},hosts=[{contains=string,exact=string,ignoreCase=boolean,prefix=string,suffix=string}],paths=[{contains=string,exact=string,ignoreCase=boolean,prefix=string,suffix=string}],resources=[{contains=string,exact=string,ignoreCase=boolean,prefix=string,suffix=string}]},notDestination={headerSet={headers=[{name=string,value={contains=string,exact=string,ignoreCase=boolean,prefix=string,suffix=string}}]},hosts=[{contains=string,exact=string,ignoreCase=boolean,prefix=string,suffix=string}],paths=[{contains=string,exact=string,ignoreCase=boolean,prefix=string,suffix=string}],resources=[{contains=string,exact=string,ignoreCase=boolean,prefix=string,suffix=string}]}} --match-conditions=to={destination={headerSet={headers=[{name=string,value={contains=string,exact=string,ignoreCase=boolean,prefix=string,suffix=string}}]},hosts=[{contains=string,exact=string,ignoreCase=boolean,prefix=string,suffix=string}],paths=[{contains=string,exact=string,ignoreCase=boolean,prefix=string,suffix=string}],resources=[{contains=string,exact=string,ignoreCase=boolean,prefix=string,suffix=string}]},notDestination={headerSet={headers=[{name=string,value={contains=string,exact=string,ignoreCase=boolean,prefix=string,suffix=string}}]},hosts=[{contains=string,exact=string,ignoreCase=boolean,prefix=string,suffix=string}],paths=[{contains=string,exact=string,ignoreCase=boolean,prefix=string,suffix=string}],resources=[{contains=string,exact=string,ignoreCase=boolean,prefix=string,suffix=string}]}}
JSON Example:--match-conditions='[{"to": {"destination": {"headerSet": {"headers": [{"name": "string", "value": {"contains": "string", "exact": "string", "ignoreCase": boolean, "prefix": "string", "suffix": "string"}}]}, "hosts": [{"contains": "string", "exact": "string", "ignoreCase": boolean, "prefix": "string", "suffix": "string"}], "paths": [{"contains": "string", "exact": "string", "ignoreCase": boolean, "prefix": "string", "suffix": "string"}], "resources": [{"contains": "string", "exact": "string", "ignoreCase": boolean, "prefix": "string", "suffix": "string"}]}, "notDestination": {"headerSet": {"headers": [{"name": "string", "value": {"contains": "string", "exact": "string", "ignoreCase": boolean, "prefix": "string", "suffix": "string"}}]}, "hosts": [{"contains": "string", "exact": "string", "ignoreCase": boolean, "prefix": "string", "suffix": "string"}], "paths": [{"contains": "string", "exact": "string", "ignoreCase": boolean, "prefix": "string", "suffix": "string"}], "resources": [{"contains": "string", "exact": "string", "ignoreCase": boolean, "prefix": "string", "suffix": "string"}]}}}]'
File Example:--match-conditions=path_to_file.(yaml|json)
--producer-metadata=[PRODUCER_METADATA,…]-
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.
KEY-
Sets
KEYvalue. VALUE-
Sets
VALUEvalue.
Shorthand Example:--producer-metadata=string=string
JSON Example:--producer-metadata='{"string": "string"}'
File Example:--producer-metadata=path_to_file.(yaml|json)
- GCLOUD WIDE FLAGS
-
These flags are available to all commands:
--access-token-file,--account,--billing-project,--configuration,--flags-file,--flatten,--format,--help,--impersonate-service-account,--log-http,--project,--quiet,--trace-token,--user-output-enabled,--verbosity.Run
$ gcloud helpfor details. - API REFERENCE
-
This command uses the
networkservices/v1beta1API. The full documentation for this API can be found at: https://cloud.google.com/networking - NOTES
-
This command is currently in beta and might change without notice. This variant
is also available:
gcloud alpha service-extensions extension-bindings create
gcloud beta service-extensions extension-bindings create
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-10-20 UTC.