gcloud apihub apis versions operations create (OPERATION : --api=API --location=LOCATION --version=VERSION) [--attributes=[ATTRIBUTES,…]] [--details-deprecated --details-description=DETAILS_DESCRIPTION --documentation-external-uri=DOCUMENTATION_EXTERNAL_URI --http-operation-method=HTTP_OPERATION_METHOD --http-operation-path=HTTP_OPERATION_PATH --http-operation-path-description=HTTP_OPERATION_PATH_DESCRIPTION | [--mcp-tool-name=MCP_TOOL_NAME : --mcp-tool-description=MCP_TOOL_DESCRIPTION --mcp-tool-input-schema-json=MCP_TOOL_INPUT_SCHEMA_JSON --mcp-tool-output-schema-json=MCP_TOOL_OUTPUT_SCHEMA_JSON --mcp-tool-title=MCP_TOOL_TITLE --mcp-tool-annotations-additional-hints=[MCP_TOOL_ANNOTATIONS_ADDITIONAL_HINTS,…] --mcp-tool-annotations-destructive-hint --mcp-tool-annotations-idempotent-hint --mcp-tool-annotations-open-world-hint --mcp-tool-annotations-read-only-hint --mcp-tool-annotations-title=MCP_TOOL_ANNOTATIONS_TITLE]] [GCLOUD_WIDE_FLAG …]
gcloud apihub apis versions operations create
Format:
projects/{project}/locations/{location}/apis/{api}/versions/{version}/operations/{operation}
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:
operation on the command line with a fully
specified name;
--project on the command line;
core/project.
OPERATION
To set the operation attribute:
operation on the command line.
--api=APIapi attribute:
operation on the command line with a fully
specified name;
--api on the command line.
--location=LOCATIONlocation attribute:
operation on the command line with a fully
specified name;
--location on the command line.
--version=VERSIONversion attribute:
operation on the command line with a fully
specified name;
--version on the command line.
--attributes=[ATTRIBUTES,…]projects/{project}/locations/{location}/attributes/{attribute}. The
value is the attribute values associated with the resource.
KEYKEY value.
VALUEVALUE value.
enumValuesvaluesdescriptiondisplayNameidThis value should be 4-63 characters, and valid characters are /[a-z][0-9]-/.
immutablejsonValuesvaluesstringValuesvaluesuriValuesvaluesShorthand 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)
--details-deprecatedoperation.deprecated`is marked as
true in the spec.
--details-description=DETAILS_DESCRIPTION in the spec, in case description is empty,
operation.summary will be used.
Documentation details.
--documentation-external-uri=DOCUMENTATION_EXTERNAL_URI--http-operation-method=HTTP_OPERATION_METHODHTTP_OPERATION_METHOD must be one of:
deletegetheadoptionspatchpostputtrace--http-operation-path=HTTP_OPERATION_PATH--http-operation-path-description=HTTP_OPERATION_PATH_DESCRIPTION--mcp-tool-name=MCP_TOOL_NAME--mcp-tool-description=MCP_TOOL_DESCRIPTION--mcp-tool-input-schema-json=MCP_TOOL_INPUT_SCHEMA_JSON--mcp-tool-output-schema-json=MCP_TOOL_OUTPUT_SCHEMA_JSON--mcp-tool-title=MCP_TOOL_TITLE--mcp-tool-annotations-additional-hints=[MCP_TOOL_ANNOTATIONS_ADDITIONAL_HINTS,…]KEYVALUEShorthand Example:
--mcp-tool-annotations-additional-hints=string=string
JSON Example:
--mcp-tool-annotations-additional-hints='{"string": "string"}'
File Example:
--mcp-tool-annotations-additional-hints=path_to_file.(yaml|json)
--mcp-tool-annotations-destructive-hint--mcp-tool-annotations-idempotent-hint--mcp-tool-annotations-open-world-hint--mcp-tool-annotations-read-only-hint--mcp-tool-annotations-title=MCP_TOOL_ANNOTATIONS_TITLE--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.
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
gcloud alpha apihub apis versions operations 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-05-27 UTC.