1
0
Fork 0
mirror of https://github.com/imjasonh/gcloud-help synced 2026-07-08 10:35:03 +00:00
gcloud-help/gcloud/apihub/external-apis/update
2026-03-26 12:11:21 +00:00

330 lines
12 KiB
Text

NAME
gcloud apihub external-apis update - update an External Api
SYNOPSIS
gcloud apihub external-apis update (EXTERNAL_API : --location=LOCATION)
[--description=DESCRIPTION] [--display-name=DISPLAY_NAME]
[--attributes=[ATTRIBUTES,...]
| --update-attributes=[UPDATE_ATTRIBUTES,...] --clear-attributes
| --remove-attributes=REMOVE_ATTRIBUTES]
[--clear-documentation
--documentation-external-uri=DOCUMENTATION_EXTERNAL_URI]
[--endpoints=[ENDPOINTS,...]
| --add-endpoints=[ADD_ENDPOINTS,...] --clear-endpoints
| --remove-endpoints=[REMOVE_ENDPOINTS,...]]
[--paths=[PATHS,...] | --add-paths=[ADD_PATHS,...] --clear-paths
| --remove-paths=[REMOVE_PATHS,...]] [GCLOUD_WIDE_FLAG ...]
DESCRIPTION
Update an external api
EXAMPLES
To update the display name of an external API with the ID my-external-api,
run:
$ gcloud apihub external-apis update my-external-api \
--display-name="New External API Name" --project=my-project \
--location=us-central1
POSITIONAL ARGUMENTS
ExternalApi resource - Identifier. Format:
projects/{project}/locations/{location}/externalApi/{externalApi}. 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 project attribute:
◆ provide the argument external_api on the command line with a fully
specified name;
◆ provide the argument --project on the command line;
◆ set the property core/project.
This must be specified.
EXTERNAL_API
ID of the externalApi or fully qualified identifier for the
externalApi.
To set the external_api attribute:
▸ provide the argument external_api on the command line.
This positional argument must be specified if any of the other
arguments in this group are specified.
--location=LOCATION
The location id of the externalApi resource.
To set the location attribute:
▸ provide the argument external_api on the command line with a
fully specified name;
▸ provide the argument --location on the command line.
FLAGS
--description=DESCRIPTION
Description of the external API. Max length is 2000 characters (Unicode
Code Points).
--display-name=DISPLAY_NAME
Display name of the external API. Max length is 63 characters (Unicode
Code Points).
Update attributes.
At most one of these can be specified:
--attributes=[ATTRIBUTES,...]
Set attributes to new value. The list of user defined attributes
associated with the Version resource. The key is the attribute name.
It will be of the format:
projects/{project}/locations/{location}/attributes/{attribute}. The
value is the attribute values associated with the resource.
KEY
Sets KEY value.
VALUE
Sets VALUE value.
enumValues
The attribute values associated with a resource in case
attribute data type is enum.
values
The attribute values in case attribute data type is enum.
description
The detailed description of the allowed value.
displayName
The display name of the allowed value.
id
The ID of the allowed value.
▪ If provided, the same will be used. The service
will throw an error if the specified id is already
used by another allowed value in the same attribute
resource.
▪ If not provided, a system generated id derived
from the display name will be used. In this case,
the service will handle conflict resolution by
adding a system generated suffix in case of
duplicates.
This value should be 4-63 characters, and valid
characters are /[a-z][0-9]-/.
immutable
When set to true, the allowed value cannot be updated
or deleted by the user. It can only be true for
System defined attributes.
jsonValues
The attribute values associated with a resource in case
attribute data type is JSON.
values
The attribute values in case attribute data type is
string or JSON.
stringValues
The attribute values associated with a resource in case
attribute data type is string.
values
The attribute values in case attribute data type is
string or JSON.
uriValues
The attribute values associated with a resource in case
attribute data type is URL, URI or IP, like
gs://bucket-name/object-name.
values
The attribute values in case attribute data type is
string or JSON.
Shorthand Example:
--attributes=string={enumValues={values=[{description=string,displayName=string,id=string,immutable=boolean}]},jsonValues={values=[string]},stringValues={values=[string]},uriValues={values=[string]}}
JSON Example:
--attributes='{"string": {"enumValues": {"values": [{"description": "string", "displayName": "string", "id": "string", "immutable": boolean}]}, "jsonValues": {"values": ["string"]}, "stringValues": {"values": ["string"]}, "uriValues": {"values": ["string"]}}}'
File Example:
--attributes=path_to_file.(yaml|json)
Or at least one of these can be specified:
--update-attributes=[UPDATE_ATTRIBUTES,...]
Update attributes value or add key value pair. The list of user
defined attributes associated with the Version resource. The key is
the attribute name. It will be of the format:
projects/{project}/locations/{location}/attributes/{attribute}. The
value is the attribute values associated with the resource.
KEY
Sets KEY value.
VALUE
Sets VALUE value.
enumValues
The attribute values associated with a resource in case
attribute data type is enum.
values
The attribute values in case attribute data type is
enum.
description
The detailed description of the allowed value.
displayName
The display name of the allowed value.
id
The ID of the allowed value.
◆ If provided, the same will be used. The service
will throw an error if the specified id is
already used by another allowed value in the same
attribute resource.
◆ If not provided, a system generated id derived
from the display name will be used. In this case,
the service will handle conflict resolution by
adding a system generated suffix in case of
duplicates.
This value should be 4-63 characters, and valid
characters are /[a-z][0-9]-/.
immutable
When set to true, the allowed value cannot be
updated or deleted by the user. It can only be true
for System defined attributes.
jsonValues
The attribute values associated with a resource in case
attribute data type is JSON.
values
The attribute values in case attribute data type is
string or JSON.
stringValues
The attribute values associated with a resource in case
attribute data type is string.
values
The attribute values in case attribute data type is
string or JSON.
uriValues
The attribute values associated with a resource in case
attribute data type is URL, URI or IP, like
gs://bucket-name/object-name.
values
The attribute values in case attribute data type is
string or JSON.
Shorthand Example:
--update-attributes=string={enumValues={values=[{description=string,displayName=string,id=string,immutable=boolean}]},jsonValues={values=[string]},stringValues={values=[string]},uriValues={values=[string]}}
JSON Example:
--update-attributes='{"string": {"enumValues": {"values": [{"description": "string", "displayName": "string", "id": "string", "immutable": boolean}]}, "jsonValues": {"values": ["string"]}, "stringValues": {"values": ["string"]}, "uriValues": {"values": ["string"]}}}'
File Example:
--update-attributes=path_to_file.(yaml|json)
At most one of these can be specified:
--clear-attributes
Clear attributes value and set to empty map.
--remove-attributes=REMOVE_ATTRIBUTES
Remove existing value from map attributes. Sets remove_attributes
value.
Shorthand Example:
--remove-attributes=string,string
JSON Example:
--remove-attributes=["string"]
File Example:
--remove-attributes=path_to_file.(yaml|json)
Documentation details.
--clear-documentation
Set googleCloudApihubV1ExternalApi.documentation back to default value.
--documentation-external-uri=DOCUMENTATION_EXTERNAL_URI
The uri of the externally hosted documentation.
Update endpoints.
At most one of these can be specified:
--endpoints=[ENDPOINTS,...]
Set endpoints to new value.
Or at least one of these can be specified:
--add-endpoints=[ADD_ENDPOINTS,...]
Add new value to endpoints list.
At most one of these can be specified:
--clear-endpoints
Clear endpoints value and set to empty list.
--remove-endpoints=[REMOVE_ENDPOINTS,...]
Remove existing value from endpoints list.
Update paths.
At most one of these can be specified:
--paths=[PATHS,...]
Set paths to new value.
Or at least one of these can be specified:
--add-paths=[ADD_PATHS,...]
Add new value to paths list.
At most one of these can be specified:
--clear-paths
Clear paths value and set to empty list.
--remove-paths=[REMOVE_PATHS,...]
Remove existing value from paths list.
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 help for details.
API REFERENCE
This command uses the apihub/v1 API. The full documentation for this API
can be found at:
https://cloud.google.com/apigee/docs/api-hub/what-is-api-hub
NOTES
This variant is also available:
$ gcloud alpha apihub external-apis update