From 840e463c58748a5ccf596d56cb8e27222e672737 Mon Sep 17 00:00:00 2001
From: Yoshi Automation Method Details
"enabled": True or False, # If logging is enabled or not.
"samplingRate": 3.14, # Percentage of requests to be logged, expressed as a fraction in range(0,1].
},
- "privateServiceConnectConfig": { # Represents configuration for private service connect. # Optional. Configuration for private service connect. network and private_service_connect_config are mutually exclusive.
- "enablePrivateServiceConnect": True or False, # Required. If true, expose the IndexEndpoint via private service connect.
- "projectAllowlist": [ # A list of Projects from which the forwarding rule will target the service attachment.
- "A String",
- ],
- },
"trafficSplit": { # A map from a DeployedModel's ID to the percentage of this Endpoint's traffic that should be forwarded to that DeployedModel. If a DeployedModel's ID is not listed in this map, then it receives no traffic. The traffic percentage values must add up to 100, or map must be empty if the Endpoint is to not accept any traffic at a moment.
"a_key": 42,
},
@@ -1110,16 +1104,51 @@ Method Details
"safetySettings": [ # Optional. Per request settings for blocking unsafe content. Enforced on GenerateContentResponse.candidates.
{ # Safety settings.
"category": "A String", # Required. Harm category.
+ "method": "A String", # Optional. Specify if the threshold is used for probability or severity score. If not specified, the threshold is used for probability score.
"threshold": "A String", # Required. The harm block threshold.
},
],
+ "systemInstructions": [ # Optional. The user provided system instructions for the model.
+ { # The base structured datatype containing multi-part content of a message. A `Content` includes a `role` field designating the producer of the `Content` and a `parts` field containing multi-part data that contains the content of the message turn.
+ "parts": [ # Required. Ordered `Parts` that constitute a single message. Parts may have different IANA MIME types.
+ { # A datatype containing media that is part of a multi-part `Content` message. A `Part` consists of data which has an associated datatype. A `Part` can only contain one of the accepted types in `Part.data`. A `Part` must have a fixed IANA MIME type identifying the type and subtype of the media if `inline_data` or `file_data` field is filled with raw bytes.
+ "fileData": { # URI based data. # Optional. URI based data.
+ "fileUri": "A String", # Required. URI.
+ "mimeType": "A String", # Required. The IANA standard MIME type of the source data.
+ },
+ "functionCall": { # A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing the parameters and their values. # Optional. A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] with the parameters and their values.
+ "args": { # Optional. Required. The function parameters and values in JSON object format. See [FunctionDeclaration.parameters] for parameter details.
+ "a_key": "", # Properties of the object.
+ },
+ "name": "A String", # Required. The name of the function to call. Matches [FunctionDeclaration.name].
+ },
+ "functionResponse": { # The result output from a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function is used as context to the model. This should contain the result of a [FunctionCall] made based on model prediction. # Optional. The result output of a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function call. It is used as context to the model.
+ "name": "A String", # Required. The name of the function to call. Matches [FunctionDeclaration.name] and [FunctionCall.name].
+ "response": { # Required. The function response in JSON object format.
+ "a_key": "", # Properties of the object.
+ },
+ },
+ "inlineData": { # Raw media bytes. Text should not be sent as raw bytes, use the 'text' field. # Optional. Inlined bytes data.
+ "data": "A String", # Required. Raw bytes for media formats.
+ "mimeType": "A String", # Required. The IANA standard MIME type of the source data.
+ },
+ "text": "A String", # Optional. Text part (can be code).
+ "videoMetadata": { # Metadata describes the input video content. # Optional. Video metadata. The metadata should only be specified while the video data is presented in inline_data or file_data.
+ "endOffset": "A String", # Optional. The end offset of the video.
+ "startOffset": "A String", # Optional. The start offset of the video.
+ },
+ },
+ ],
+ "role": "A String", # Optional. The producer of the content. Must be either 'user' or 'model'. Useful to set for multi-turn conversations, otherwise can be left blank or unset.
+ },
+ ],
"tools": [ # Optional. A list of `Tools` the model may use to generate the next response. A `Tool` is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model.
{ # Tool details that the model may use to generate response. A `Tool` is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model. A Tool object should contain exactly one type of Tool (e.g FunctionDeclaration, Retrieval or GoogleSearchRetrieval).
"functionDeclarations": [ # Optional. Function tool type. One or more function declarations to be passed to the model along with the current user query. Model may decide to call a subset of these functions by populating FunctionCall in the response. User should provide a FunctionResponse for each function call in the next turn. Based on the function responses, Model will generate the final response back to the user. Maximum 64 function declarations can be provided.
{ # Structured representation of a function declaration as defined by the [OpenAPI 3.0 specification](https://spec.openapis.org/oas/v3.0.3). Included in this declaration are the function name and parameters. This FunctionDeclaration is a representation of a block of code that can be used as a `Tool` by the model and executed by the client.
"description": "A String", # Optional. Description and purpose of the function. Model uses it to decide how and whether to call the function.
- "name": "A String", # Required. The name of the function to call. Must start with a letter or an underscore. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
- "parameters": { # Schema is used to define the format of input/output data. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema). More fields may be added in the future as needed. # Optional. Describes the parameters to this function in JSON Schema Object format. Reflects the Open API 3.03 Parameter Object. string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter. For function with no parameters, this can be left unset. Example with 1 required and 1 optional parameter: type: OBJECT properties: param1: type: STRING param2: type: INTEGER required: - param1
+ "name": "A String", # Required. The name of the function to call. Must start with a letter or an underscore. Must be a-z, A-Z, 0-9, or contain underscores, dots and dashes, with a maximum length of 64.
+ "parameters": { # Schema is used to define the format of input/output data. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema). More fields may be added in the future as needed. # Optional. Describes the parameters to this function in JSON Schema Object format. Reflects the Open API 3.03 Parameter Object. string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter. For function with no parameters, this can be left unset. Parameter names must start with a letter or an underscore and must only contain chars a-z, A-Z, 0-9, or underscores with a maximum length of 64. Example with 1 required and 1 optional parameter: type: OBJECT properties: param1: type: STRING param2: type: INTEGER required: - param1
"description": "A String", # Optional. The description of the data.
"enum": [ # Optional. Possible values of the element of Type.STRING with enum format. For example we can define an Enum Direction as : {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]}
"A String",
@@ -1138,6 +1167,15 @@ Method Details
},
},
],
+ "googleSearchRetrieval": { # Tool to retrieve public web data for grounding, powered by Google. # Optional. GoogleSearchRetrieval tool type. Specialized retrieval tool that is powered by Google search.
+ "disableAttribution": True or False, # Optional. Disable using the result from this tool in detecting grounding attribution. This does not affect how the result is given to the model for generation.
+ },
+ "retrieval": { # Defines a retrieval tool that model can call to access external knowledge. # Optional. Retrieval tool type. System will always execute the provided retrieval tool(s) to get external knowledge to answer the prompt. Retrieval results are presented to the model for generation.
+ "disableAttribution": True or False, # Optional. Disable using the result from this tool in detecting grounding attribution. This does not affect how the result is given to the model for generation.
+ "vertexAiSearch": { # Retrieve from Vertex AI Search datastore for grounding. See https://cloud.google.com/vertex-ai-search-and-conversation # Set to use data source powered by Vertex AI Search.
+ "datastore": "A String", # Required. Fully-qualified Vertex AI Search's datastore resource ID. projects/<>/locations/<>/collections/<>/dataStores/<>
+ },
+ },
},
],
}
@@ -1440,12 +1478,6 @@ Method Details
"enabled": True or False, # If logging is enabled or not.
"samplingRate": 3.14, # Percentage of requests to be logged, expressed as a fraction in range(0,1].
},
- "privateServiceConnectConfig": { # Represents configuration for private service connect. # Optional. Configuration for private service connect. network and private_service_connect_config are mutually exclusive.
- "enablePrivateServiceConnect": True or False, # Required. If true, expose the IndexEndpoint via private service connect.
- "projectAllowlist": [ # A list of Projects from which the forwarding rule will target the service attachment.
- "A String",
- ],
- },
"trafficSplit": { # A map from a DeployedModel's ID to the percentage of this Endpoint's traffic that should be forwarded to that DeployedModel. If a DeployedModel's ID is not listed in this map, then it receives no traffic. The traffic percentage values must add up to 100, or map must be empty if the Endpoint is to not accept any traffic at a moment.
"a_key": 42,
},
@@ -1459,7 +1491,7 @@ Method Details
Args:
parent: string, Required. The resource name of the Location from which to list the Endpoints. Format: `projects/{project}/locations/{location}` (required)
- filter: string, Optional. An expression for filtering the results of the request. For field names both snake_case and camelCase are supported. * `endpoint` supports = and !=. `endpoint` represents the Endpoint ID, i.e. the last segment of the Endpoint's resource name. * `display_name` supports = and, != * `labels` supports general map functions that is: * `labels.key=value` - key:value equality * `labels.key:* or labels:key - key existence * A key including a space must be quoted. `labels."a key"`. Some examples: * `endpoint=1` * `displayName="myDisplayName"` * `labels.myKey="myValue"`
+ filter: string, Optional. An expression for filtering the results of the request. For field names both snake_case and camelCase are supported. * `endpoint` supports = and !=. `endpoint` represents the Endpoint ID, i.e. the last segment of the Endpoint's resource name. * `display_name` supports = and, != * `labels` supports general map functions that is: * `labels.key=value` - key:value equality * `labels.key:* or labels:key - key existence * A key including a space must be quoted. `labels."a key"`. * `base_model_name` only supports = Some examples: * `endpoint=1` * `displayName="myDisplayName"` * `labels.myKey="myValue"` * `baseModelName="text-bison"`
orderBy: string, A comma-separated list of fields to order by, sorted in ascending order. Use "desc" after a field name for descending. Supported fields: * `display_name` * `create_time` * `update_time` Example: `display_name, create_time desc`.
pageSize: integer, Optional. The standard list page size.
pageToken: string, Optional. The standard list page token. Typically obtained via ListEndpointsResponse.next_page_token of the previous EndpointService.ListEndpoints call.
@@ -1643,12 +1675,6 @@ Method Details
"enabled": True or False, # If logging is enabled or not.
"samplingRate": 3.14, # Percentage of requests to be logged, expressed as a fraction in range(0,1].
},
- "privateServiceConnectConfig": { # Represents configuration for private service connect. # Optional. Configuration for private service connect. network and private_service_connect_config are mutually exclusive.
- "enablePrivateServiceConnect": True or False, # Required. If true, expose the IndexEndpoint via private service connect.
- "projectAllowlist": [ # A list of Projects from which the forwarding rule will target the service attachment.
- "A String",
- ],
- },
"trafficSplit": { # A map from a DeployedModel's ID to the percentage of this Endpoint's traffic that should be forwarded to that DeployedModel. If a DeployedModel's ID is not listed in this map, then it receives no traffic. The traffic percentage values must add up to 100, or map must be empty if the Endpoint is to not accept any traffic at a moment.
"a_key": 42,
},
@@ -2038,12 +2064,6 @@ Method Details
"enabled": True or False, # If logging is enabled or not.
"samplingRate": 3.14, # Percentage of requests to be logged, expressed as a fraction in range(0,1].
},
- "privateServiceConnectConfig": { # Represents configuration for private service connect. # Optional. Configuration for private service connect. network and private_service_connect_config are mutually exclusive.
- "enablePrivateServiceConnect": True or False, # Required. If true, expose the IndexEndpoint via private service connect.
- "projectAllowlist": [ # A list of Projects from which the forwarding rule will target the service attachment.
- "A String",
- ],
- },
"trafficSplit": { # A map from a DeployedModel's ID to the percentage of this Endpoint's traffic that should be forwarded to that DeployedModel. If a DeployedModel's ID is not listed in this map, then it receives no traffic. The traffic percentage values must add up to 100, or map must be empty if the Endpoint is to not accept any traffic at a moment.
"a_key": 42,
},
@@ -2228,12 +2248,6 @@ Method Details
"enabled": True or False, # If logging is enabled or not.
"samplingRate": 3.14, # Percentage of requests to be logged, expressed as a fraction in range(0,1].
},
- "privateServiceConnectConfig": { # Represents configuration for private service connect. # Optional. Configuration for private service connect. network and private_service_connect_config are mutually exclusive.
- "enablePrivateServiceConnect": True or False, # Required. If true, expose the IndexEndpoint via private service connect.
- "projectAllowlist": [ # A list of Projects from which the forwarding rule will target the service attachment.
- "A String",
- ],
- },
"trafficSplit": { # A map from a DeployedModel's ID to the percentage of this Endpoint's traffic that should be forwarded to that DeployedModel. If a DeployedModel's ID is not listed in this map, then it receives no traffic. The traffic percentage values must add up to 100, or map must be empty if the Endpoint is to not accept any traffic at a moment.
"a_key": 42,
},
@@ -2562,16 +2576,51 @@ Method Details
"safetySettings": [ # Optional. Per request settings for blocking unsafe content. Enforced on GenerateContentResponse.candidates.
{ # Safety settings.
"category": "A String", # Required. Harm category.
+ "method": "A String", # Optional. Specify if the threshold is used for probability or severity score. If not specified, the threshold is used for probability score.
"threshold": "A String", # Required. The harm block threshold.
},
],
+ "systemInstructions": [ # Optional. The user provided system instructions for the model.
+ { # The base structured datatype containing multi-part content of a message. A `Content` includes a `role` field designating the producer of the `Content` and a `parts` field containing multi-part data that contains the content of the message turn.
+ "parts": [ # Required. Ordered `Parts` that constitute a single message. Parts may have different IANA MIME types.
+ { # A datatype containing media that is part of a multi-part `Content` message. A `Part` consists of data which has an associated datatype. A `Part` can only contain one of the accepted types in `Part.data`. A `Part` must have a fixed IANA MIME type identifying the type and subtype of the media if `inline_data` or `file_data` field is filled with raw bytes.
+ "fileData": { # URI based data. # Optional. URI based data.
+ "fileUri": "A String", # Required. URI.
+ "mimeType": "A String", # Required. The IANA standard MIME type of the source data.
+ },
+ "functionCall": { # A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing the parameters and their values. # Optional. A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] with the parameters and their values.
+ "args": { # Optional. Required. The function parameters and values in JSON object format. See [FunctionDeclaration.parameters] for parameter details.
+ "a_key": "", # Properties of the object.
+ },
+ "name": "A String", # Required. The name of the function to call. Matches [FunctionDeclaration.name].
+ },
+ "functionResponse": { # The result output from a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function is used as context to the model. This should contain the result of a [FunctionCall] made based on model prediction. # Optional. The result output of a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function call. It is used as context to the model.
+ "name": "A String", # Required. The name of the function to call. Matches [FunctionDeclaration.name] and [FunctionCall.name].
+ "response": { # Required. The function response in JSON object format.
+ "a_key": "", # Properties of the object.
+ },
+ },
+ "inlineData": { # Raw media bytes. Text should not be sent as raw bytes, use the 'text' field. # Optional. Inlined bytes data.
+ "data": "A String", # Required. Raw bytes for media formats.
+ "mimeType": "A String", # Required. The IANA standard MIME type of the source data.
+ },
+ "text": "A String", # Optional. Text part (can be code).
+ "videoMetadata": { # Metadata describes the input video content. # Optional. Video metadata. The metadata should only be specified while the video data is presented in inline_data or file_data.
+ "endOffset": "A String", # Optional. The end offset of the video.
+ "startOffset": "A String", # Optional. The start offset of the video.
+ },
+ },
+ ],
+ "role": "A String", # Optional. The producer of the content. Must be either 'user' or 'model'. Useful to set for multi-turn conversations, otherwise can be left blank or unset.
+ },
+ ],
"tools": [ # Optional. A list of `Tools` the model may use to generate the next response. A `Tool` is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model.
{ # Tool details that the model may use to generate response. A `Tool` is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model. A Tool object should contain exactly one type of Tool (e.g FunctionDeclaration, Retrieval or GoogleSearchRetrieval).
"functionDeclarations": [ # Optional. Function tool type. One or more function declarations to be passed to the model along with the current user query. Model may decide to call a subset of these functions by populating FunctionCall in the response. User should provide a FunctionResponse for each function call in the next turn. Based on the function responses, Model will generate the final response back to the user. Maximum 64 function declarations can be provided.
{ # Structured representation of a function declaration as defined by the [OpenAPI 3.0 specification](https://spec.openapis.org/oas/v3.0.3). Included in this declaration are the function name and parameters. This FunctionDeclaration is a representation of a block of code that can be used as a `Tool` by the model and executed by the client.
"description": "A String", # Optional. Description and purpose of the function. Model uses it to decide how and whether to call the function.
- "name": "A String", # Required. The name of the function to call. Must start with a letter or an underscore. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
- "parameters": { # Schema is used to define the format of input/output data. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema). More fields may be added in the future as needed. # Optional. Describes the parameters to this function in JSON Schema Object format. Reflects the Open API 3.03 Parameter Object. string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter. For function with no parameters, this can be left unset. Example with 1 required and 1 optional parameter: type: OBJECT properties: param1: type: STRING param2: type: INTEGER required: - param1
+ "name": "A String", # Required. The name of the function to call. Must start with a letter or an underscore. Must be a-z, A-Z, 0-9, or contain underscores, dots and dashes, with a maximum length of 64.
+ "parameters": { # Schema is used to define the format of input/output data. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema). More fields may be added in the future as needed. # Optional. Describes the parameters to this function in JSON Schema Object format. Reflects the Open API 3.03 Parameter Object. string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter. For function with no parameters, this can be left unset. Parameter names must start with a letter or an underscore and must only contain chars a-z, A-Z, 0-9, or underscores with a maximum length of 64. Example with 1 required and 1 optional parameter: type: OBJECT properties: param1: type: STRING param2: type: INTEGER required: - param1
"description": "A String", # Optional. The description of the data.
"enum": [ # Optional. Possible values of the element of Type.STRING with enum format. For example we can define an Enum Direction as : {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]}
"A String",
@@ -2590,6 +2639,15 @@ Method Details
},
},
],
+ "googleSearchRetrieval": { # Tool to retrieve public web data for grounding, powered by Google. # Optional. GoogleSearchRetrieval tool type. Specialized retrieval tool that is powered by Google search.
+ "disableAttribution": True or False, # Optional. Disable using the result from this tool in detecting grounding attribution. This does not affect how the result is given to the model for generation.
+ },
+ "retrieval": { # Defines a retrieval tool that model can call to access external knowledge. # Optional. Retrieval tool type. System will always execute the provided retrieval tool(s) to get external knowledge to answer the prompt. Retrieval results are presented to the model for generation.
+ "disableAttribution": True or False, # Optional. Disable using the result from this tool in detecting grounding attribution. This does not affect how the result is given to the model for generation.
+ "vertexAiSearch": { # Retrieve from Vertex AI Search datastore for grounding. See https://cloud.google.com/vertex-ai-search-and-conversation # Set to use data source powered by Vertex AI Search.
+ "datastore": "A String", # Required. Fully-qualified Vertex AI Search's datastore resource ID. projects/<>/locations/<>/collections/<>/dataStores/<>
+ },
+ },
},
],
}
diff --git a/docs/dyn/aiplatform_v1.projects.locations.html b/docs/dyn/aiplatform_v1.projects.locations.html
index cb9c1ae83f6..ea145746d2e 100644
--- a/docs/dyn/aiplatform_v1.projects.locations.html
+++ b/docs/dyn/aiplatform_v1.projects.locations.html
@@ -174,6 +174,11 @@ Instance Methods
Returns the operations Resource.
+ +Returns the persistentResources Resource.
+ @@ -209,6 +214,11 @@Returns the trainingPipelines Resource.
+
+ tuningJobs()
+
Returns the tuningJobs Resource.
+Close httplib2 connections.
diff --git a/docs/dyn/aiplatform_v1.projects.locations.indexEndpoints.html b/docs/dyn/aiplatform_v1.projects.locations.indexEndpoints.html index 9c9df7d2c88..44d2d5368b8 100644 --- a/docs/dyn/aiplatform_v1.projects.locations.indexEndpoints.html +++ b/docs/dyn/aiplatform_v1.projects.locations.indexEndpoints.html @@ -377,7 +377,7 @@
+ close()
Close httplib2 connections.
+
+ create(parent, body=None, persistentResourceId=None, x__xgafv=None)
Creates a PersistentResource.
+ +Deletes a PersistentResource.
+ +Gets a PersistentResource.
+
+ list(parent, pageSize=None, pageToken=None, x__xgafv=None)
Lists PersistentResources in a Location.
+ +Retrieves the next page of results.
+
+ patch(name, body=None, updateMask=None, x__xgafv=None)
Updates a PersistentResource.
+close()
+ Close httplib2 connections.+
create(parent, body=None, persistentResourceId=None, x__xgafv=None)
+ Creates a PersistentResource. + +Args: + parent: string, Required. The resource name of the Location to create the PersistentResource in. Format: `projects/{project}/locations/{location}` (required) + body: object, The request body. + The object takes the form of: + +{ # Represents long-lasting resources that are dedicated to users to runs custom workloads. A PersistentResource can have multiple node pools and each node pool can have its own machine spec. + "createTime": "A String", # Output only. Time when the PersistentResource was created. + "displayName": "A String", # Optional. The display name of the PersistentResource. The name can be up to 128 characters long and can consist of any UTF-8 characters. + "encryptionSpec": { # Represents a customer-managed encryption key spec that can be applied to a top-level resource. # Optional. Customer-managed encryption key spec for a PersistentResource. If set, this PersistentResource and all sub-resources of this PersistentResource will be secured by this key. + "kmsKeyName": "A String", # Required. The Cloud KMS resource identifier of the customer managed encryption key used to protect a resource. Has the form: `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`. The key needs to be in the same region as where the compute resource is created. + }, + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # Output only. Only populated when persistent resource's state is `STOPPING` or `ERROR`. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "labels": { # Optional. The labels with user-defined metadata to organize PersistentResource. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. See https://goo.gl/xmQnxf for more information and examples of labels. + "a_key": "A String", + }, + "name": "A String", # Immutable. Resource name of a PersistentResource. + "network": "A String", # Optional. The full name of the Compute Engine [network](/compute/docs/networks-and-firewalls#networks) to peered with Vertex AI to host the persistent resources. For example, `projects/12345/global/networks/myVPC`. [Format](/compute/docs/reference/rest/v1/networks/insert) is of the form `projects/{project}/global/networks/{network}`. Where {project} is a project number, as in `12345`, and {network} is a network name. To specify this field, you must have already [configured VPC Network Peering for Vertex AI](https://cloud.google.com/vertex-ai/docs/general/vpc-peering). If this field is left unspecified, the resources aren't peered with any network. + "reservedIpRanges": [ # Optional. A list of names for the reserved IP ranges under the VPC network that can be used for this persistent resource. If set, we will deploy the persistent resource within the provided IP ranges. Otherwise, the persistent resource is deployed to any IP ranges under the provided VPC network. Example: ['vertex-ai-ip-range']. + "A String", + ], + "resourcePools": [ # Required. The spec of the pools of different resources. + { # Represents the spec of a group of resources of the same type, for example machine type, disk, and accelerators, in a PersistentResource. + "autoscalingSpec": { # The min/max number of replicas allowed if enabling autoscaling # Optional. Optional spec to configure GKE autoscaling + "maxReplicaCount": "A String", # Optional. max replicas in the node pool, must be ≥ replica_count and > min_replica_count or will throw error + "minReplicaCount": "A String", # Optional. min replicas in the node pool, must be ≤ replica_count and < max_replica_count or will throw error + }, + "diskSpec": { # Represents the spec of disk options. # Optional. Disk spec for the machine in this node pool. + "bootDiskSizeGb": 42, # Size in GB of the boot disk (default is 100GB). + "bootDiskType": "A String", # Type of the boot disk (default is "pd-ssd"). Valid values: "pd-ssd" (Persistent Disk Solid State Drive) or "pd-standard" (Persistent Disk Hard Disk Drive). + }, + "id": "A String", # Immutable. The unique ID in a PersistentResource for referring to this resource pool. User can specify it if necessary. Otherwise, it's generated automatically. + "machineSpec": { # Specification of a single machine. # Required. Immutable. The specification of a single machine. + "acceleratorCount": 42, # The number of accelerators to attach to the machine. + "acceleratorType": "A String", # Immutable. The type of accelerator(s) that may be attached to the machine as per accelerator_count. + "machineType": "A String", # Immutable. The type of the machine. See the [list of machine types supported for prediction](https://cloud.google.com/vertex-ai/docs/predictions/configure-compute#machine-types) See the [list of machine types supported for custom training](https://cloud.google.com/vertex-ai/docs/training/configure-compute#machine-types). For DeployedModel this field is optional, and the default value is `n1-standard-2`. For BatchPredictionJob or as part of WorkerPoolSpec this field is required. + "tpuTopology": "A String", # Immutable. The topology of the TPUs. Corresponds to the TPU topologies available from GKE. (Example: tpu_topology: "2x2x1"). + }, + "replicaCount": "A String", # Optional. The total number of machines to use for this resource pool. + "usedReplicaCount": "A String", # Output only. The number of machines currently in use by training jobs for this resource pool. Will replace idle_replica_count. + }, + ], + "resourceRuntime": { # Persistent Cluster runtime information as output # Output only. Runtime information of the Persistent Resource. + "accessUris": { # Output only. URIs for user to connect to the Cluster. Example: { "RAY_HEAD_NODE_INTERNAL_IP": "head-node-IP:10001" "RAY_DASHBOARD_URI": "ray-dashboard-address:8888" } + "a_key": "A String", + }, + "notebookRuntimeTemplate": "A String", # Output only. The resource name of NotebookRuntimeTemplate for the RoV Persistent Cluster The NotebokRuntimeTemplate is created in the same VPC (if set), and with the same Ray and Python version as the Persistent Cluster. Example: "projects/1000/locations/us-central1/notebookRuntimeTemplates/abc123" + }, + "resourceRuntimeSpec": { # Configuration for the runtime on a PersistentResource instance, including but not limited to: * Service accounts used to run the workloads. * Whether to make it a dedicated Ray Cluster. # Optional. Persistent Resource runtime spec. For example, used for Ray cluster configuration. + "raySpec": { # Configuration information for the Ray cluster. For experimental launch, Ray cluster creation and Persistent cluster creation are 1:1 mapping: We will provision all the nodes within the Persistent cluster as Ray nodes. # Optional. Ray cluster configuration. Required when creating a dedicated RayCluster on the PersistentResource. + "headNodeResourcePoolId": "A String", # Optional. This will be used to indicate which resource pool will serve as the Ray head node(the first node within that pool). Will use the machine from the first workerpool as the head node by default if this field isn't set. + "imageUri": "A String", # Optional. Default image for user to choose a preferred ML framework (for example, TensorFlow or Pytorch) by choosing from [Vertex prebuilt images](https://cloud.google.com/vertex-ai/docs/training/pre-built-containers). Either this or the resource_pool_images is required. Use this field if you need all the resource pools to have the same Ray image. Otherwise, use the {@code resource_pool_images} field. + "rayMetricSpec": { # Configuration for the Ray metrics. # Optional. Ray metrics configurations. + "disabled": True or False, # Optional. Flag to disable the Ray metrics collection. + }, + "resourcePoolImages": { # Optional. Required if image_uri isn't set. A map of resource_pool_id to prebuild Ray image if user need to use different images for different head/worker pools. This map needs to cover all the resource pool ids. Example: { "ray_head_node_pool": "head image" "ray_worker_node_pool1": "worker image" "ray_worker_node_pool2": "another worker image" } + "a_key": "A String", + }, + }, + "serviceAccountSpec": { # Configuration for the use of custom service account to run the workloads. # Optional. Configure the use of workload identity on the PersistentResource + "enableCustomServiceAccount": True or False, # Required. If true, custom user-managed service account is enforced to run any workloads (for example, Vertex Jobs) on the resource. Otherwise, uses the [Vertex AI Custom Code Service Agent](https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents). + "serviceAccount": "A String", # Optional. Default service account that this PersistentResource's workloads run as. The workloads include: * Any runtime specified via `ResourceRuntimeSpec` on creation time, for example, Ray. * Jobs submitted to PersistentResource, if no other service account specified in the job specs. Only works when custom service account is enabled and users have the `iam.serviceAccounts.actAs` permission on this service account. Required if any containers are specified in `ResourceRuntimeSpec`. + }, + }, + "startTime": "A String", # Output only. Time when the PersistentResource for the first time entered the `RUNNING` state. + "state": "A String", # Output only. The detailed state of a Study. + "updateTime": "A String", # Output only. Time when the PersistentResource was most recently updated. +} + + persistentResourceId: string, Required. The ID to use for the PersistentResource, which become the final component of the PersistentResource's resource name. The maximum length is 63 characters, and valid characters are `/^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$/`. + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # This resource represents a long-running operation that is the result of a network API call. + "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, +}+
delete(name, x__xgafv=None)
+ Deletes a PersistentResource. + +Args: + name: string, Required. The name of the PersistentResource to be deleted. Format: `projects/{project}/locations/{location}/persistentResources/{persistent_resource}` (required) + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # This resource represents a long-running operation that is the result of a network API call. + "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, +}+
get(name, x__xgafv=None)
+ Gets a PersistentResource. + +Args: + name: string, Required. The name of the PersistentResource resource. Format: `projects/{project_id_or_number}/locations/{location_id}/persistentResources/{persistent_resource_id}` (required) + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # Represents long-lasting resources that are dedicated to users to runs custom workloads. A PersistentResource can have multiple node pools and each node pool can have its own machine spec. + "createTime": "A String", # Output only. Time when the PersistentResource was created. + "displayName": "A String", # Optional. The display name of the PersistentResource. The name can be up to 128 characters long and can consist of any UTF-8 characters. + "encryptionSpec": { # Represents a customer-managed encryption key spec that can be applied to a top-level resource. # Optional. Customer-managed encryption key spec for a PersistentResource. If set, this PersistentResource and all sub-resources of this PersistentResource will be secured by this key. + "kmsKeyName": "A String", # Required. The Cloud KMS resource identifier of the customer managed encryption key used to protect a resource. Has the form: `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`. The key needs to be in the same region as where the compute resource is created. + }, + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # Output only. Only populated when persistent resource's state is `STOPPING` or `ERROR`. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "labels": { # Optional. The labels with user-defined metadata to organize PersistentResource. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. See https://goo.gl/xmQnxf for more information and examples of labels. + "a_key": "A String", + }, + "name": "A String", # Immutable. Resource name of a PersistentResource. + "network": "A String", # Optional. The full name of the Compute Engine [network](/compute/docs/networks-and-firewalls#networks) to peered with Vertex AI to host the persistent resources. For example, `projects/12345/global/networks/myVPC`. [Format](/compute/docs/reference/rest/v1/networks/insert) is of the form `projects/{project}/global/networks/{network}`. Where {project} is a project number, as in `12345`, and {network} is a network name. To specify this field, you must have already [configured VPC Network Peering for Vertex AI](https://cloud.google.com/vertex-ai/docs/general/vpc-peering). If this field is left unspecified, the resources aren't peered with any network. + "reservedIpRanges": [ # Optional. A list of names for the reserved IP ranges under the VPC network that can be used for this persistent resource. If set, we will deploy the persistent resource within the provided IP ranges. Otherwise, the persistent resource is deployed to any IP ranges under the provided VPC network. Example: ['vertex-ai-ip-range']. + "A String", + ], + "resourcePools": [ # Required. The spec of the pools of different resources. + { # Represents the spec of a group of resources of the same type, for example machine type, disk, and accelerators, in a PersistentResource. + "autoscalingSpec": { # The min/max number of replicas allowed if enabling autoscaling # Optional. Optional spec to configure GKE autoscaling + "maxReplicaCount": "A String", # Optional. max replicas in the node pool, must be ≥ replica_count and > min_replica_count or will throw error + "minReplicaCount": "A String", # Optional. min replicas in the node pool, must be ≤ replica_count and < max_replica_count or will throw error + }, + "diskSpec": { # Represents the spec of disk options. # Optional. Disk spec for the machine in this node pool. + "bootDiskSizeGb": 42, # Size in GB of the boot disk (default is 100GB). + "bootDiskType": "A String", # Type of the boot disk (default is "pd-ssd"). Valid values: "pd-ssd" (Persistent Disk Solid State Drive) or "pd-standard" (Persistent Disk Hard Disk Drive). + }, + "id": "A String", # Immutable. The unique ID in a PersistentResource for referring to this resource pool. User can specify it if necessary. Otherwise, it's generated automatically. + "machineSpec": { # Specification of a single machine. # Required. Immutable. The specification of a single machine. + "acceleratorCount": 42, # The number of accelerators to attach to the machine. + "acceleratorType": "A String", # Immutable. The type of accelerator(s) that may be attached to the machine as per accelerator_count. + "machineType": "A String", # Immutable. The type of the machine. See the [list of machine types supported for prediction](https://cloud.google.com/vertex-ai/docs/predictions/configure-compute#machine-types) See the [list of machine types supported for custom training](https://cloud.google.com/vertex-ai/docs/training/configure-compute#machine-types). For DeployedModel this field is optional, and the default value is `n1-standard-2`. For BatchPredictionJob or as part of WorkerPoolSpec this field is required. + "tpuTopology": "A String", # Immutable. The topology of the TPUs. Corresponds to the TPU topologies available from GKE. (Example: tpu_topology: "2x2x1"). + }, + "replicaCount": "A String", # Optional. The total number of machines to use for this resource pool. + "usedReplicaCount": "A String", # Output only. The number of machines currently in use by training jobs for this resource pool. Will replace idle_replica_count. + }, + ], + "resourceRuntime": { # Persistent Cluster runtime information as output # Output only. Runtime information of the Persistent Resource. + "accessUris": { # Output only. URIs for user to connect to the Cluster. Example: { "RAY_HEAD_NODE_INTERNAL_IP": "head-node-IP:10001" "RAY_DASHBOARD_URI": "ray-dashboard-address:8888" } + "a_key": "A String", + }, + "notebookRuntimeTemplate": "A String", # Output only. The resource name of NotebookRuntimeTemplate for the RoV Persistent Cluster The NotebokRuntimeTemplate is created in the same VPC (if set), and with the same Ray and Python version as the Persistent Cluster. Example: "projects/1000/locations/us-central1/notebookRuntimeTemplates/abc123" + }, + "resourceRuntimeSpec": { # Configuration for the runtime on a PersistentResource instance, including but not limited to: * Service accounts used to run the workloads. * Whether to make it a dedicated Ray Cluster. # Optional. Persistent Resource runtime spec. For example, used for Ray cluster configuration. + "raySpec": { # Configuration information for the Ray cluster. For experimental launch, Ray cluster creation and Persistent cluster creation are 1:1 mapping: We will provision all the nodes within the Persistent cluster as Ray nodes. # Optional. Ray cluster configuration. Required when creating a dedicated RayCluster on the PersistentResource. + "headNodeResourcePoolId": "A String", # Optional. This will be used to indicate which resource pool will serve as the Ray head node(the first node within that pool). Will use the machine from the first workerpool as the head node by default if this field isn't set. + "imageUri": "A String", # Optional. Default image for user to choose a preferred ML framework (for example, TensorFlow or Pytorch) by choosing from [Vertex prebuilt images](https://cloud.google.com/vertex-ai/docs/training/pre-built-containers). Either this or the resource_pool_images is required. Use this field if you need all the resource pools to have the same Ray image. Otherwise, use the {@code resource_pool_images} field. + "rayMetricSpec": { # Configuration for the Ray metrics. # Optional. Ray metrics configurations. + "disabled": True or False, # Optional. Flag to disable the Ray metrics collection. + }, + "resourcePoolImages": { # Optional. Required if image_uri isn't set. A map of resource_pool_id to prebuild Ray image if user need to use different images for different head/worker pools. This map needs to cover all the resource pool ids. Example: { "ray_head_node_pool": "head image" "ray_worker_node_pool1": "worker image" "ray_worker_node_pool2": "another worker image" } + "a_key": "A String", + }, + }, + "serviceAccountSpec": { # Configuration for the use of custom service account to run the workloads. # Optional. Configure the use of workload identity on the PersistentResource + "enableCustomServiceAccount": True or False, # Required. If true, custom user-managed service account is enforced to run any workloads (for example, Vertex Jobs) on the resource. Otherwise, uses the [Vertex AI Custom Code Service Agent](https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents). + "serviceAccount": "A String", # Optional. Default service account that this PersistentResource's workloads run as. The workloads include: * Any runtime specified via `ResourceRuntimeSpec` on creation time, for example, Ray. * Jobs submitted to PersistentResource, if no other service account specified in the job specs. Only works when custom service account is enabled and users have the `iam.serviceAccounts.actAs` permission on this service account. Required if any containers are specified in `ResourceRuntimeSpec`. + }, + }, + "startTime": "A String", # Output only. Time when the PersistentResource for the first time entered the `RUNNING` state. + "state": "A String", # Output only. The detailed state of a Study. + "updateTime": "A String", # Output only. Time when the PersistentResource was most recently updated. +}+
list(parent, pageSize=None, pageToken=None, x__xgafv=None)
+ Lists PersistentResources in a Location. + +Args: + parent: string, Required. The resource name of the Location to list the PersistentResources from. Format: `projects/{project}/locations/{location}` (required) + pageSize: integer, Optional. The standard list page size. + pageToken: string, Optional. The standard list page token. Typically obtained via ListPersistentResourceResponse.next_page_token of the previous PersistentResourceService.ListPersistentResource call. + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # Response message for PersistentResourceService.ListPersistentResources + "nextPageToken": "A String", # A token to retrieve next page of results. Pass to ListPersistentResourcesRequest.page_token to obtain that page. + "persistentResources": [ + { # Represents long-lasting resources that are dedicated to users to runs custom workloads. A PersistentResource can have multiple node pools and each node pool can have its own machine spec. + "createTime": "A String", # Output only. Time when the PersistentResource was created. + "displayName": "A String", # Optional. The display name of the PersistentResource. The name can be up to 128 characters long and can consist of any UTF-8 characters. + "encryptionSpec": { # Represents a customer-managed encryption key spec that can be applied to a top-level resource. # Optional. Customer-managed encryption key spec for a PersistentResource. If set, this PersistentResource and all sub-resources of this PersistentResource will be secured by this key. + "kmsKeyName": "A String", # Required. The Cloud KMS resource identifier of the customer managed encryption key used to protect a resource. Has the form: `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`. The key needs to be in the same region as where the compute resource is created. + }, + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # Output only. Only populated when persistent resource's state is `STOPPING` or `ERROR`. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "labels": { # Optional. The labels with user-defined metadata to organize PersistentResource. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. See https://goo.gl/xmQnxf for more information and examples of labels. + "a_key": "A String", + }, + "name": "A String", # Immutable. Resource name of a PersistentResource. + "network": "A String", # Optional. The full name of the Compute Engine [network](/compute/docs/networks-and-firewalls#networks) to peered with Vertex AI to host the persistent resources. For example, `projects/12345/global/networks/myVPC`. [Format](/compute/docs/reference/rest/v1/networks/insert) is of the form `projects/{project}/global/networks/{network}`. Where {project} is a project number, as in `12345`, and {network} is a network name. To specify this field, you must have already [configured VPC Network Peering for Vertex AI](https://cloud.google.com/vertex-ai/docs/general/vpc-peering). If this field is left unspecified, the resources aren't peered with any network. + "reservedIpRanges": [ # Optional. A list of names for the reserved IP ranges under the VPC network that can be used for this persistent resource. If set, we will deploy the persistent resource within the provided IP ranges. Otherwise, the persistent resource is deployed to any IP ranges under the provided VPC network. Example: ['vertex-ai-ip-range']. + "A String", + ], + "resourcePools": [ # Required. The spec of the pools of different resources. + { # Represents the spec of a group of resources of the same type, for example machine type, disk, and accelerators, in a PersistentResource. + "autoscalingSpec": { # The min/max number of replicas allowed if enabling autoscaling # Optional. Optional spec to configure GKE autoscaling + "maxReplicaCount": "A String", # Optional. max replicas in the node pool, must be ≥ replica_count and > min_replica_count or will throw error + "minReplicaCount": "A String", # Optional. min replicas in the node pool, must be ≤ replica_count and < max_replica_count or will throw error + }, + "diskSpec": { # Represents the spec of disk options. # Optional. Disk spec for the machine in this node pool. + "bootDiskSizeGb": 42, # Size in GB of the boot disk (default is 100GB). + "bootDiskType": "A String", # Type of the boot disk (default is "pd-ssd"). Valid values: "pd-ssd" (Persistent Disk Solid State Drive) or "pd-standard" (Persistent Disk Hard Disk Drive). + }, + "id": "A String", # Immutable. The unique ID in a PersistentResource for referring to this resource pool. User can specify it if necessary. Otherwise, it's generated automatically. + "machineSpec": { # Specification of a single machine. # Required. Immutable. The specification of a single machine. + "acceleratorCount": 42, # The number of accelerators to attach to the machine. + "acceleratorType": "A String", # Immutable. The type of accelerator(s) that may be attached to the machine as per accelerator_count. + "machineType": "A String", # Immutable. The type of the machine. See the [list of machine types supported for prediction](https://cloud.google.com/vertex-ai/docs/predictions/configure-compute#machine-types) See the [list of machine types supported for custom training](https://cloud.google.com/vertex-ai/docs/training/configure-compute#machine-types). For DeployedModel this field is optional, and the default value is `n1-standard-2`. For BatchPredictionJob or as part of WorkerPoolSpec this field is required. + "tpuTopology": "A String", # Immutable. The topology of the TPUs. Corresponds to the TPU topologies available from GKE. (Example: tpu_topology: "2x2x1"). + }, + "replicaCount": "A String", # Optional. The total number of machines to use for this resource pool. + "usedReplicaCount": "A String", # Output only. The number of machines currently in use by training jobs for this resource pool. Will replace idle_replica_count. + }, + ], + "resourceRuntime": { # Persistent Cluster runtime information as output # Output only. Runtime information of the Persistent Resource. + "accessUris": { # Output only. URIs for user to connect to the Cluster. Example: { "RAY_HEAD_NODE_INTERNAL_IP": "head-node-IP:10001" "RAY_DASHBOARD_URI": "ray-dashboard-address:8888" } + "a_key": "A String", + }, + "notebookRuntimeTemplate": "A String", # Output only. The resource name of NotebookRuntimeTemplate for the RoV Persistent Cluster The NotebokRuntimeTemplate is created in the same VPC (if set), and with the same Ray and Python version as the Persistent Cluster. Example: "projects/1000/locations/us-central1/notebookRuntimeTemplates/abc123" + }, + "resourceRuntimeSpec": { # Configuration for the runtime on a PersistentResource instance, including but not limited to: * Service accounts used to run the workloads. * Whether to make it a dedicated Ray Cluster. # Optional. Persistent Resource runtime spec. For example, used for Ray cluster configuration. + "raySpec": { # Configuration information for the Ray cluster. For experimental launch, Ray cluster creation and Persistent cluster creation are 1:1 mapping: We will provision all the nodes within the Persistent cluster as Ray nodes. # Optional. Ray cluster configuration. Required when creating a dedicated RayCluster on the PersistentResource. + "headNodeResourcePoolId": "A String", # Optional. This will be used to indicate which resource pool will serve as the Ray head node(the first node within that pool). Will use the machine from the first workerpool as the head node by default if this field isn't set. + "imageUri": "A String", # Optional. Default image for user to choose a preferred ML framework (for example, TensorFlow or Pytorch) by choosing from [Vertex prebuilt images](https://cloud.google.com/vertex-ai/docs/training/pre-built-containers). Either this or the resource_pool_images is required. Use this field if you need all the resource pools to have the same Ray image. Otherwise, use the {@code resource_pool_images} field. + "rayMetricSpec": { # Configuration for the Ray metrics. # Optional. Ray metrics configurations. + "disabled": True or False, # Optional. Flag to disable the Ray metrics collection. + }, + "resourcePoolImages": { # Optional. Required if image_uri isn't set. A map of resource_pool_id to prebuild Ray image if user need to use different images for different head/worker pools. This map needs to cover all the resource pool ids. Example: { "ray_head_node_pool": "head image" "ray_worker_node_pool1": "worker image" "ray_worker_node_pool2": "another worker image" } + "a_key": "A String", + }, + }, + "serviceAccountSpec": { # Configuration for the use of custom service account to run the workloads. # Optional. Configure the use of workload identity on the PersistentResource + "enableCustomServiceAccount": True or False, # Required. If true, custom user-managed service account is enforced to run any workloads (for example, Vertex Jobs) on the resource. Otherwise, uses the [Vertex AI Custom Code Service Agent](https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents). + "serviceAccount": "A String", # Optional. Default service account that this PersistentResource's workloads run as. The workloads include: * Any runtime specified via `ResourceRuntimeSpec` on creation time, for example, Ray. * Jobs submitted to PersistentResource, if no other service account specified in the job specs. Only works when custom service account is enabled and users have the `iam.serviceAccounts.actAs` permission on this service account. Required if any containers are specified in `ResourceRuntimeSpec`. + }, + }, + "startTime": "A String", # Output only. Time when the PersistentResource for the first time entered the `RUNNING` state. + "state": "A String", # Output only. The detailed state of a Study. + "updateTime": "A String", # Output only. Time when the PersistentResource was most recently updated. + }, + ], +}+
list_next()
+ Retrieves the next page of results. + + Args: + previous_request: The request for the previous page. (required) + previous_response: The response from the request for the previous page. (required) + + Returns: + A request object that you can call 'execute()' on to request the next + page. Returns None if there are no more items in the collection. ++
patch(name, body=None, updateMask=None, x__xgafv=None)
+ Updates a PersistentResource. + +Args: + name: string, Immutable. Resource name of a PersistentResource. (required) + body: object, The request body. + The object takes the form of: + +{ # Represents long-lasting resources that are dedicated to users to runs custom workloads. A PersistentResource can have multiple node pools and each node pool can have its own machine spec. + "createTime": "A String", # Output only. Time when the PersistentResource was created. + "displayName": "A String", # Optional. The display name of the PersistentResource. The name can be up to 128 characters long and can consist of any UTF-8 characters. + "encryptionSpec": { # Represents a customer-managed encryption key spec that can be applied to a top-level resource. # Optional. Customer-managed encryption key spec for a PersistentResource. If set, this PersistentResource and all sub-resources of this PersistentResource will be secured by this key. + "kmsKeyName": "A String", # Required. The Cloud KMS resource identifier of the customer managed encryption key used to protect a resource. Has the form: `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`. The key needs to be in the same region as where the compute resource is created. + }, + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # Output only. Only populated when persistent resource's state is `STOPPING` or `ERROR`. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "labels": { # Optional. The labels with user-defined metadata to organize PersistentResource. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. See https://goo.gl/xmQnxf for more information and examples of labels. + "a_key": "A String", + }, + "name": "A String", # Immutable. Resource name of a PersistentResource. + "network": "A String", # Optional. The full name of the Compute Engine [network](/compute/docs/networks-and-firewalls#networks) to peered with Vertex AI to host the persistent resources. For example, `projects/12345/global/networks/myVPC`. [Format](/compute/docs/reference/rest/v1/networks/insert) is of the form `projects/{project}/global/networks/{network}`. Where {project} is a project number, as in `12345`, and {network} is a network name. To specify this field, you must have already [configured VPC Network Peering for Vertex AI](https://cloud.google.com/vertex-ai/docs/general/vpc-peering). If this field is left unspecified, the resources aren't peered with any network. + "reservedIpRanges": [ # Optional. A list of names for the reserved IP ranges under the VPC network that can be used for this persistent resource. If set, we will deploy the persistent resource within the provided IP ranges. Otherwise, the persistent resource is deployed to any IP ranges under the provided VPC network. Example: ['vertex-ai-ip-range']. + "A String", + ], + "resourcePools": [ # Required. The spec of the pools of different resources. + { # Represents the spec of a group of resources of the same type, for example machine type, disk, and accelerators, in a PersistentResource. + "autoscalingSpec": { # The min/max number of replicas allowed if enabling autoscaling # Optional. Optional spec to configure GKE autoscaling + "maxReplicaCount": "A String", # Optional. max replicas in the node pool, must be ≥ replica_count and > min_replica_count or will throw error + "minReplicaCount": "A String", # Optional. min replicas in the node pool, must be ≤ replica_count and < max_replica_count or will throw error + }, + "diskSpec": { # Represents the spec of disk options. # Optional. Disk spec for the machine in this node pool. + "bootDiskSizeGb": 42, # Size in GB of the boot disk (default is 100GB). + "bootDiskType": "A String", # Type of the boot disk (default is "pd-ssd"). Valid values: "pd-ssd" (Persistent Disk Solid State Drive) or "pd-standard" (Persistent Disk Hard Disk Drive). + }, + "id": "A String", # Immutable. The unique ID in a PersistentResource for referring to this resource pool. User can specify it if necessary. Otherwise, it's generated automatically. + "machineSpec": { # Specification of a single machine. # Required. Immutable. The specification of a single machine. + "acceleratorCount": 42, # The number of accelerators to attach to the machine. + "acceleratorType": "A String", # Immutable. The type of accelerator(s) that may be attached to the machine as per accelerator_count. + "machineType": "A String", # Immutable. The type of the machine. See the [list of machine types supported for prediction](https://cloud.google.com/vertex-ai/docs/predictions/configure-compute#machine-types) See the [list of machine types supported for custom training](https://cloud.google.com/vertex-ai/docs/training/configure-compute#machine-types). For DeployedModel this field is optional, and the default value is `n1-standard-2`. For BatchPredictionJob or as part of WorkerPoolSpec this field is required. + "tpuTopology": "A String", # Immutable. The topology of the TPUs. Corresponds to the TPU topologies available from GKE. (Example: tpu_topology: "2x2x1"). + }, + "replicaCount": "A String", # Optional. The total number of machines to use for this resource pool. + "usedReplicaCount": "A String", # Output only. The number of machines currently in use by training jobs for this resource pool. Will replace idle_replica_count. + }, + ], + "resourceRuntime": { # Persistent Cluster runtime information as output # Output only. Runtime information of the Persistent Resource. + "accessUris": { # Output only. URIs for user to connect to the Cluster. Example: { "RAY_HEAD_NODE_INTERNAL_IP": "head-node-IP:10001" "RAY_DASHBOARD_URI": "ray-dashboard-address:8888" } + "a_key": "A String", + }, + "notebookRuntimeTemplate": "A String", # Output only. The resource name of NotebookRuntimeTemplate for the RoV Persistent Cluster The NotebokRuntimeTemplate is created in the same VPC (if set), and with the same Ray and Python version as the Persistent Cluster. Example: "projects/1000/locations/us-central1/notebookRuntimeTemplates/abc123" + }, + "resourceRuntimeSpec": { # Configuration for the runtime on a PersistentResource instance, including but not limited to: * Service accounts used to run the workloads. * Whether to make it a dedicated Ray Cluster. # Optional. Persistent Resource runtime spec. For example, used for Ray cluster configuration. + "raySpec": { # Configuration information for the Ray cluster. For experimental launch, Ray cluster creation and Persistent cluster creation are 1:1 mapping: We will provision all the nodes within the Persistent cluster as Ray nodes. # Optional. Ray cluster configuration. Required when creating a dedicated RayCluster on the PersistentResource. + "headNodeResourcePoolId": "A String", # Optional. This will be used to indicate which resource pool will serve as the Ray head node(the first node within that pool). Will use the machine from the first workerpool as the head node by default if this field isn't set. + "imageUri": "A String", # Optional. Default image for user to choose a preferred ML framework (for example, TensorFlow or Pytorch) by choosing from [Vertex prebuilt images](https://cloud.google.com/vertex-ai/docs/training/pre-built-containers). Either this or the resource_pool_images is required. Use this field if you need all the resource pools to have the same Ray image. Otherwise, use the {@code resource_pool_images} field. + "rayMetricSpec": { # Configuration for the Ray metrics. # Optional. Ray metrics configurations. + "disabled": True or False, # Optional. Flag to disable the Ray metrics collection. + }, + "resourcePoolImages": { # Optional. Required if image_uri isn't set. A map of resource_pool_id to prebuild Ray image if user need to use different images for different head/worker pools. This map needs to cover all the resource pool ids. Example: { "ray_head_node_pool": "head image" "ray_worker_node_pool1": "worker image" "ray_worker_node_pool2": "another worker image" } + "a_key": "A String", + }, + }, + "serviceAccountSpec": { # Configuration for the use of custom service account to run the workloads. # Optional. Configure the use of workload identity on the PersistentResource + "enableCustomServiceAccount": True or False, # Required. If true, custom user-managed service account is enforced to run any workloads (for example, Vertex Jobs) on the resource. Otherwise, uses the [Vertex AI Custom Code Service Agent](https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents). + "serviceAccount": "A String", # Optional. Default service account that this PersistentResource's workloads run as. The workloads include: * Any runtime specified via `ResourceRuntimeSpec` on creation time, for example, Ray. * Jobs submitted to PersistentResource, if no other service account specified in the job specs. Only works when custom service account is enabled and users have the `iam.serviceAccounts.actAs` permission on this service account. Required if any containers are specified in `ResourceRuntimeSpec`. + }, + }, + "startTime": "A String", # Output only. Time when the PersistentResource for the first time entered the `RUNNING` state. + "state": "A String", # Output only. The detailed state of a Study. + "updateTime": "A String", # Output only. Time when the PersistentResource was most recently updated. +} + + updateMask: string, Required. Specify the fields to be overwritten in the PersistentResource by the update method. + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # This resource represents a long-running operation that is the result of a network API call. + "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, +}+
+ operations()
+
Returns the operations Resource.
+ +
+ close()
Close httplib2 connections.
+close()
+ Close httplib2 connections.+
Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.
+
+ close()
Close httplib2 connections.
+ +Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
+cancel(name, x__xgafv=None)
+ Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. + +Args: + name: string, The name of the operation resource to be cancelled. (required) + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } +}+
close()
+ Close httplib2 connections.+
get(name, x__xgafv=None)
+ Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. + +Args: + name: string, The name of the operation resource. (required) + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # This resource represents a long-running operation that is the result of a network API call. + "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, +}+
Close httplib2 connections.
+ +Deletes an Extension.
+
+ execute(name, body=None, x__xgafv=None)
Executes the request against a given extension.
+ +Gets an Extension.
+
+ import_(parent, body=None, x__xgafv=None)
Imports an Extension.
+
+ list(parent, filter=None, orderBy=None, pageSize=None, pageToken=None, x__xgafv=None)
Lists Extensions in a location.
+ +Retrieves the next page of results.
+
+ patch(name, body=None, updateMask=None, x__xgafv=None)
Updates an Extension.
close()
Close httplib2 connections.
delete(name, x__xgafv=None)
+ Deletes an Extension. + +Args: + name: string, Required. The name of the Extension resource to be deleted. Format: `projects/{project}/locations/{location}/extensions/{extension}` (required) + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # This resource represents a long-running operation that is the result of a network API call. + "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, +}+
execute(name, body=None, x__xgafv=None)
+ Executes the request against a given extension. + +Args: + name: string, Required. Name (identifier) of the extension; Format: `projects/{project}/locations/{location}/extensions/{extension}` (required) + body: object, The request body. + The object takes the form of: + +{ # Request message for ExtensionExecutionService.ExecuteExtension. + "operationId": "A String", # Required. The operation to be executed in this extension as defined in ExtensionOperation.operation_id. + "operationParams": { # Optional. Request parameters that will be used for executing this operation. The struct should be in a form of map with param name as the key and actual param value as the value. E.g. If this operation requires a param "name" to be set to "abc". you can set this to something like {"name": "abc"}. + "a_key": "", # Properties of the object. + }, + "runtimeAuthConfig": { # Auth configuration to run the extension. # Optional. Auth config provided at runtime to override the default value in Extension.manifest.auth_config. The AuthConfig.auth_type should match the value in Extension.manifest.auth_config. + "apiKeyConfig": { # Config for authentication with API key. # Config for API key auth. + "apiKeySecret": "A String", # Required. The name of the SecretManager secret version resource storing the API key. Format: `projects/{project}/secrets/{secrete}/versions/{version}` + "httpElementLocation": "A String", # Required. The location of the API key. + "name": "A String", # Required. The parameter name of the API key. E.g. If the API request is "https://example.com/act?api_key=", "api_key" would be the parameter name. + }, + "authType": "A String", # Type of auth scheme. + "googleServiceAccountConfig": { # Config for Google Service Account Authentication. # Config for Google Service Account auth. + "serviceAccount": "A String", # Optional. The service account that the extension execution service runs as. - If it is not specified, the Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) will be used. - If the service account is provided, the service account should grant Vertex AI Extension Service Agent `iam.serviceAccounts.getAccessToken` permission. + }, + "httpBasicAuthConfig": { # Config for HTTP Basic Authentication. # Config for HTTP Basic auth. + "credentialSecret": "A String", # Required. The name of the SecretManager secret version resource storing the base64 encoded credentials. Format: `projects/{project}/secrets/{secrete}/versions/{version}` + }, + "noAuth": { # Empty message, used to indicate no authentication for an endpoint. # Config for no auth. + }, + "oauthConfig": { # Config for user oauth. # Config for user oauth. + "accessToken": "A String", # Access token for extension endpoint. Only used to propagate token from ExecuteExtensionRequest.runtime_auth_config at request time. + "serviceAccount": "A String", # The service account that the extension execution service will use to query extension. Used for generating OAuth token on behalf of provided service account. - If the service account is provided, the service account should grant Vertex AI Service Agent `iam.serviceAccounts.getAccessToken` permission. + }, + "oidcConfig": { # Config for user OIDC auth. # Config for user OIDC auth. + "idToken": "A String", # OpenID Connect formatted ID token for extension endpoint. Only used to propagate token from ExecuteExtensionRequest.runtime_auth_config at request time. + }, + }, +} + + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # Response message for ExtensionExecutionService.ExecuteExtension. + "content": "A String", # Response content from the extension. The content should be conformant to the response.content schema in the extension's manifest/OpenAPI spec. + "output": { # Output from the extension. The output should be conformant to the extension's manifest/OpenAPI spec. The output can contain values for keys like "content", "headers", etc. This field is deprecated, please use content field below for the extension execution result. + "a_key": "", # Properties of the object. + }, +}+
get(name, x__xgafv=None)
+ Gets an Extension. + +Args: + name: string, Required. The name of the Extension resource. Format: `projects/{project}/locations/{location}/extensions/{extension}` (required) + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # Extensions are tools for large language models to access external data, run computations, etc. + "createTime": "A String", # Output only. Timestamp when this Extension was created. + "description": "A String", # Optional. The description of the Extension. + "displayName": "A String", # Required. The display name of the Extension. The name can be up to 128 characters long and can consist of any UTF-8 characters. + "etag": "A String", # Optional. Used to perform consistent read-modify-write updates. If not set, a blind "overwrite" update happens. + "extensionOperations": [ # Output only. Supported operations. + { # Operation of an extension. + "functionDeclaration": { # Structured representation of a function declaration as defined by the [OpenAPI 3.0 specification](https://spec.openapis.org/oas/v3.0.3). Included in this declaration are the function name and parameters. This FunctionDeclaration is a representation of a block of code that can be used as a `Tool` by the model and executed by the client. # Output only. Structured representation of a function declaration as defined by the OpenAPI Spec. + "description": "A String", # Optional. Description and purpose of the function. Model uses it to decide how and whether to call the function. + "name": "A String", # Required. The name of the function to call. Must start with a letter or an underscore. Must be a-z, A-Z, 0-9, or contain underscores, dots and dashes, with a maximum length of 64. + "parameters": { # Schema is used to define the format of input/output data. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema). More fields may be added in the future as needed. # Optional. Describes the parameters to this function in JSON Schema Object format. Reflects the Open API 3.03 Parameter Object. string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter. For function with no parameters, this can be left unset. Parameter names must start with a letter or an underscore and must only contain chars a-z, A-Z, 0-9, or underscores with a maximum length of 64. Example with 1 required and 1 optional parameter: type: OBJECT properties: param1: type: STRING param2: type: INTEGER required: - param1 + "description": "A String", # Optional. The description of the data. + "enum": [ # Optional. Possible values of the element of Type.STRING with enum format. For example we can define an Enum Direction as : {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]} + "A String", + ], + "example": "", # Optional. Example of the object. Will only populated when the object is the root. + "format": "A String", # Optional. The format of the data. Supported formats: for NUMBER type: float, double for INTEGER type: int32, int64 + "items": # Object with schema name: GoogleCloudAiplatformV1beta1Schema # Optional. Schema of the elements of Type.ARRAY. + "nullable": True or False, # Optional. Indicates if the value may be null. + "properties": { # Optional. Properties of Type.OBJECT. + "a_key": # Object with schema name: GoogleCloudAiplatformV1beta1Schema + }, + "required": [ # Optional. Required properties of Type.OBJECT. + "A String", + ], + "type": "A String", # Optional. The type of the data. + }, + }, + "operationId": "A String", # Operation ID that uniquely identifies the operations among the extension. See: "Operation Object" in https://swagger.io/specification/. This field is parsed from the OpenAPI spec. For HTTP extensions, if it does not exist in the spec, we will generate one from the HTTP method and path. + }, + ], + "manifest": { # Manifest spec of an Extension needed for runtime execution. # Required. Manifest of the Extension. + "apiSpec": { # The API specification shown to the LLM. # Required. Immutable. The API specification shown to the LLM. + "openApiGcsUri": "A String", # Cloud Storage URI pointing to the OpenAPI spec. + "openApiYaml": "A String", # The API spec in Open API standard and YAML format. + }, + "authConfig": { # Auth configuration to run the extension. # Required. Immutable. Type of auth supported by this extension. + "apiKeyConfig": { # Config for authentication with API key. # Config for API key auth. + "apiKeySecret": "A String", # Required. The name of the SecretManager secret version resource storing the API key. Format: `projects/{project}/secrets/{secrete}/versions/{version}` + "httpElementLocation": "A String", # Required. The location of the API key. + "name": "A String", # Required. The parameter name of the API key. E.g. If the API request is "https://example.com/act?api_key=", "api_key" would be the parameter name. + }, + "authType": "A String", # Type of auth scheme. + "googleServiceAccountConfig": { # Config for Google Service Account Authentication. # Config for Google Service Account auth. + "serviceAccount": "A String", # Optional. The service account that the extension execution service runs as. - If it is not specified, the Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) will be used. - If the service account is provided, the service account should grant Vertex AI Extension Service Agent `iam.serviceAccounts.getAccessToken` permission. + }, + "httpBasicAuthConfig": { # Config for HTTP Basic Authentication. # Config for HTTP Basic auth. + "credentialSecret": "A String", # Required. The name of the SecretManager secret version resource storing the base64 encoded credentials. Format: `projects/{project}/secrets/{secrete}/versions/{version}` + }, + "noAuth": { # Empty message, used to indicate no authentication for an endpoint. # Config for no auth. + }, + "oauthConfig": { # Config for user oauth. # Config for user oauth. + "accessToken": "A String", # Access token for extension endpoint. Only used to propagate token from ExecuteExtensionRequest.runtime_auth_config at request time. + "serviceAccount": "A String", # The service account that the extension execution service will use to query extension. Used for generating OAuth token on behalf of provided service account. - If the service account is provided, the service account should grant Vertex AI Service Agent `iam.serviceAccounts.getAccessToken` permission. + }, + "oidcConfig": { # Config for user OIDC auth. # Config for user OIDC auth. + "idToken": "A String", # OpenID Connect formatted ID token for extension endpoint. Only used to propagate token from ExecuteExtensionRequest.runtime_auth_config at request time. + }, + }, + "description": "A String", # Required. The natural language description shown to the LLM. It should describe the usage of the extension, and is essential for the LLM to perform reasoning. + "name": "A String", # Required. Extension name shown to the LLM. The name can be up to 128 characters long. + }, + "name": "A String", # Identifier. The resource name of the Extension. + "toolUseExamples": [ # Optional. Examples to illustrate the usage of the extension as a tool. + { # A single example of the tool usage. + "displayName": "A String", # Required. The display name for example. + "extensionOperation": { # Identifies one operation of the extension. # Extension operation to call. + "extension": "A String", # Resource name of the extension. + "operationId": "A String", # Required. Operation ID of the extension. + }, + "functionName": "A String", # Function name to call. + "query": "A String", # Required. Query that should be routed to this tool. + "requestParams": { # Request parameters used for executing this tool. + "a_key": "", # Properties of the object. + }, + "responseParams": { # Response parameters generated by this tool. + "a_key": "", # Properties of the object. + }, + "responseSummary": "A String", # Summary of the tool response to the user query. + }, + ], + "updateTime": "A String", # Output only. Timestamp when this Extension was most recently updated. +}+
import_(parent, body=None, x__xgafv=None)
+ Imports an Extension. + +Args: + parent: string, Required. The resource name of the Location to import the Extension in. Format: `projects/{project}/locations/{location}` (required) + body: object, The request body. + The object takes the form of: + +{ # Extensions are tools for large language models to access external data, run computations, etc. + "createTime": "A String", # Output only. Timestamp when this Extension was created. + "description": "A String", # Optional. The description of the Extension. + "displayName": "A String", # Required. The display name of the Extension. The name can be up to 128 characters long and can consist of any UTF-8 characters. + "etag": "A String", # Optional. Used to perform consistent read-modify-write updates. If not set, a blind "overwrite" update happens. + "extensionOperations": [ # Output only. Supported operations. + { # Operation of an extension. + "functionDeclaration": { # Structured representation of a function declaration as defined by the [OpenAPI 3.0 specification](https://spec.openapis.org/oas/v3.0.3). Included in this declaration are the function name and parameters. This FunctionDeclaration is a representation of a block of code that can be used as a `Tool` by the model and executed by the client. # Output only. Structured representation of a function declaration as defined by the OpenAPI Spec. + "description": "A String", # Optional. Description and purpose of the function. Model uses it to decide how and whether to call the function. + "name": "A String", # Required. The name of the function to call. Must start with a letter or an underscore. Must be a-z, A-Z, 0-9, or contain underscores, dots and dashes, with a maximum length of 64. + "parameters": { # Schema is used to define the format of input/output data. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema). More fields may be added in the future as needed. # Optional. Describes the parameters to this function in JSON Schema Object format. Reflects the Open API 3.03 Parameter Object. string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter. For function with no parameters, this can be left unset. Parameter names must start with a letter or an underscore and must only contain chars a-z, A-Z, 0-9, or underscores with a maximum length of 64. Example with 1 required and 1 optional parameter: type: OBJECT properties: param1: type: STRING param2: type: INTEGER required: - param1 + "description": "A String", # Optional. The description of the data. + "enum": [ # Optional. Possible values of the element of Type.STRING with enum format. For example we can define an Enum Direction as : {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]} + "A String", + ], + "example": "", # Optional. Example of the object. Will only populated when the object is the root. + "format": "A String", # Optional. The format of the data. Supported formats: for NUMBER type: float, double for INTEGER type: int32, int64 + "items": # Object with schema name: GoogleCloudAiplatformV1beta1Schema # Optional. Schema of the elements of Type.ARRAY. + "nullable": True or False, # Optional. Indicates if the value may be null. + "properties": { # Optional. Properties of Type.OBJECT. + "a_key": # Object with schema name: GoogleCloudAiplatformV1beta1Schema + }, + "required": [ # Optional. Required properties of Type.OBJECT. + "A String", + ], + "type": "A String", # Optional. The type of the data. + }, + }, + "operationId": "A String", # Operation ID that uniquely identifies the operations among the extension. See: "Operation Object" in https://swagger.io/specification/. This field is parsed from the OpenAPI spec. For HTTP extensions, if it does not exist in the spec, we will generate one from the HTTP method and path. + }, + ], + "manifest": { # Manifest spec of an Extension needed for runtime execution. # Required. Manifest of the Extension. + "apiSpec": { # The API specification shown to the LLM. # Required. Immutable. The API specification shown to the LLM. + "openApiGcsUri": "A String", # Cloud Storage URI pointing to the OpenAPI spec. + "openApiYaml": "A String", # The API spec in Open API standard and YAML format. + }, + "authConfig": { # Auth configuration to run the extension. # Required. Immutable. Type of auth supported by this extension. + "apiKeyConfig": { # Config for authentication with API key. # Config for API key auth. + "apiKeySecret": "A String", # Required. The name of the SecretManager secret version resource storing the API key. Format: `projects/{project}/secrets/{secrete}/versions/{version}` + "httpElementLocation": "A String", # Required. The location of the API key. + "name": "A String", # Required. The parameter name of the API key. E.g. If the API request is "https://example.com/act?api_key=", "api_key" would be the parameter name. + }, + "authType": "A String", # Type of auth scheme. + "googleServiceAccountConfig": { # Config for Google Service Account Authentication. # Config for Google Service Account auth. + "serviceAccount": "A String", # Optional. The service account that the extension execution service runs as. - If it is not specified, the Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) will be used. - If the service account is provided, the service account should grant Vertex AI Extension Service Agent `iam.serviceAccounts.getAccessToken` permission. + }, + "httpBasicAuthConfig": { # Config for HTTP Basic Authentication. # Config for HTTP Basic auth. + "credentialSecret": "A String", # Required. The name of the SecretManager secret version resource storing the base64 encoded credentials. Format: `projects/{project}/secrets/{secrete}/versions/{version}` + }, + "noAuth": { # Empty message, used to indicate no authentication for an endpoint. # Config for no auth. + }, + "oauthConfig": { # Config for user oauth. # Config for user oauth. + "accessToken": "A String", # Access token for extension endpoint. Only used to propagate token from ExecuteExtensionRequest.runtime_auth_config at request time. + "serviceAccount": "A String", # The service account that the extension execution service will use to query extension. Used for generating OAuth token on behalf of provided service account. - If the service account is provided, the service account should grant Vertex AI Service Agent `iam.serviceAccounts.getAccessToken` permission. + }, + "oidcConfig": { # Config for user OIDC auth. # Config for user OIDC auth. + "idToken": "A String", # OpenID Connect formatted ID token for extension endpoint. Only used to propagate token from ExecuteExtensionRequest.runtime_auth_config at request time. + }, + }, + "description": "A String", # Required. The natural language description shown to the LLM. It should describe the usage of the extension, and is essential for the LLM to perform reasoning. + "name": "A String", # Required. Extension name shown to the LLM. The name can be up to 128 characters long. + }, + "name": "A String", # Identifier. The resource name of the Extension. + "toolUseExamples": [ # Optional. Examples to illustrate the usage of the extension as a tool. + { # A single example of the tool usage. + "displayName": "A String", # Required. The display name for example. + "extensionOperation": { # Identifies one operation of the extension. # Extension operation to call. + "extension": "A String", # Resource name of the extension. + "operationId": "A String", # Required. Operation ID of the extension. + }, + "functionName": "A String", # Function name to call. + "query": "A String", # Required. Query that should be routed to this tool. + "requestParams": { # Request parameters used for executing this tool. + "a_key": "", # Properties of the object. + }, + "responseParams": { # Response parameters generated by this tool. + "a_key": "", # Properties of the object. + }, + "responseSummary": "A String", # Summary of the tool response to the user query. + }, + ], + "updateTime": "A String", # Output only. Timestamp when this Extension was most recently updated. +} + + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # This resource represents a long-running operation that is the result of a network API call. + "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, +}+
list(parent, filter=None, orderBy=None, pageSize=None, pageToken=None, x__xgafv=None)
+ Lists Extensions in a location. + +Args: + parent: string, Required. The resource name of the Location to list the Extensions from. Format: `projects/{project}/locations/{location}` (required) + filter: string, Optional. The standard list filter. Supported fields: * `display_name` * `create_time` * `update_time` More detail in [AIP-160](https://google.aip.dev/160). + orderBy: string, Optional. A comma-separated list of fields to order by, sorted in ascending order. Use "desc" after a field name for descending. Supported fields: * `display_name` * `create_time` * `update_time` Example: `display_name, create_time desc`. + pageSize: integer, Optional. The standard list page size. + pageToken: string, Optional. The standard list page token. + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # Response message for ExtensionRegistryService.ListExtensions + "extensions": [ # List of Extension in the requested page. + { # Extensions are tools for large language models to access external data, run computations, etc. + "createTime": "A String", # Output only. Timestamp when this Extension was created. + "description": "A String", # Optional. The description of the Extension. + "displayName": "A String", # Required. The display name of the Extension. The name can be up to 128 characters long and can consist of any UTF-8 characters. + "etag": "A String", # Optional. Used to perform consistent read-modify-write updates. If not set, a blind "overwrite" update happens. + "extensionOperations": [ # Output only. Supported operations. + { # Operation of an extension. + "functionDeclaration": { # Structured representation of a function declaration as defined by the [OpenAPI 3.0 specification](https://spec.openapis.org/oas/v3.0.3). Included in this declaration are the function name and parameters. This FunctionDeclaration is a representation of a block of code that can be used as a `Tool` by the model and executed by the client. # Output only. Structured representation of a function declaration as defined by the OpenAPI Spec. + "description": "A String", # Optional. Description and purpose of the function. Model uses it to decide how and whether to call the function. + "name": "A String", # Required. The name of the function to call. Must start with a letter or an underscore. Must be a-z, A-Z, 0-9, or contain underscores, dots and dashes, with a maximum length of 64. + "parameters": { # Schema is used to define the format of input/output data. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema). More fields may be added in the future as needed. # Optional. Describes the parameters to this function in JSON Schema Object format. Reflects the Open API 3.03 Parameter Object. string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter. For function with no parameters, this can be left unset. Parameter names must start with a letter or an underscore and must only contain chars a-z, A-Z, 0-9, or underscores with a maximum length of 64. Example with 1 required and 1 optional parameter: type: OBJECT properties: param1: type: STRING param2: type: INTEGER required: - param1 + "description": "A String", # Optional. The description of the data. + "enum": [ # Optional. Possible values of the element of Type.STRING with enum format. For example we can define an Enum Direction as : {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]} + "A String", + ], + "example": "", # Optional. Example of the object. Will only populated when the object is the root. + "format": "A String", # Optional. The format of the data. Supported formats: for NUMBER type: float, double for INTEGER type: int32, int64 + "items": # Object with schema name: GoogleCloudAiplatformV1beta1Schema # Optional. Schema of the elements of Type.ARRAY. + "nullable": True or False, # Optional. Indicates if the value may be null. + "properties": { # Optional. Properties of Type.OBJECT. + "a_key": # Object with schema name: GoogleCloudAiplatformV1beta1Schema + }, + "required": [ # Optional. Required properties of Type.OBJECT. + "A String", + ], + "type": "A String", # Optional. The type of the data. + }, + }, + "operationId": "A String", # Operation ID that uniquely identifies the operations among the extension. See: "Operation Object" in https://swagger.io/specification/. This field is parsed from the OpenAPI spec. For HTTP extensions, if it does not exist in the spec, we will generate one from the HTTP method and path. + }, + ], + "manifest": { # Manifest spec of an Extension needed for runtime execution. # Required. Manifest of the Extension. + "apiSpec": { # The API specification shown to the LLM. # Required. Immutable. The API specification shown to the LLM. + "openApiGcsUri": "A String", # Cloud Storage URI pointing to the OpenAPI spec. + "openApiYaml": "A String", # The API spec in Open API standard and YAML format. + }, + "authConfig": { # Auth configuration to run the extension. # Required. Immutable. Type of auth supported by this extension. + "apiKeyConfig": { # Config for authentication with API key. # Config for API key auth. + "apiKeySecret": "A String", # Required. The name of the SecretManager secret version resource storing the API key. Format: `projects/{project}/secrets/{secrete}/versions/{version}` + "httpElementLocation": "A String", # Required. The location of the API key. + "name": "A String", # Required. The parameter name of the API key. E.g. If the API request is "https://example.com/act?api_key=", "api_key" would be the parameter name. + }, + "authType": "A String", # Type of auth scheme. + "googleServiceAccountConfig": { # Config for Google Service Account Authentication. # Config for Google Service Account auth. + "serviceAccount": "A String", # Optional. The service account that the extension execution service runs as. - If it is not specified, the Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) will be used. - If the service account is provided, the service account should grant Vertex AI Extension Service Agent `iam.serviceAccounts.getAccessToken` permission. + }, + "httpBasicAuthConfig": { # Config for HTTP Basic Authentication. # Config for HTTP Basic auth. + "credentialSecret": "A String", # Required. The name of the SecretManager secret version resource storing the base64 encoded credentials. Format: `projects/{project}/secrets/{secrete}/versions/{version}` + }, + "noAuth": { # Empty message, used to indicate no authentication for an endpoint. # Config for no auth. + }, + "oauthConfig": { # Config for user oauth. # Config for user oauth. + "accessToken": "A String", # Access token for extension endpoint. Only used to propagate token from ExecuteExtensionRequest.runtime_auth_config at request time. + "serviceAccount": "A String", # The service account that the extension execution service will use to query extension. Used for generating OAuth token on behalf of provided service account. - If the service account is provided, the service account should grant Vertex AI Service Agent `iam.serviceAccounts.getAccessToken` permission. + }, + "oidcConfig": { # Config for user OIDC auth. # Config for user OIDC auth. + "idToken": "A String", # OpenID Connect formatted ID token for extension endpoint. Only used to propagate token from ExecuteExtensionRequest.runtime_auth_config at request time. + }, + }, + "description": "A String", # Required. The natural language description shown to the LLM. It should describe the usage of the extension, and is essential for the LLM to perform reasoning. + "name": "A String", # Required. Extension name shown to the LLM. The name can be up to 128 characters long. + }, + "name": "A String", # Identifier. The resource name of the Extension. + "toolUseExamples": [ # Optional. Examples to illustrate the usage of the extension as a tool. + { # A single example of the tool usage. + "displayName": "A String", # Required. The display name for example. + "extensionOperation": { # Identifies one operation of the extension. # Extension operation to call. + "extension": "A String", # Resource name of the extension. + "operationId": "A String", # Required. Operation ID of the extension. + }, + "functionName": "A String", # Function name to call. + "query": "A String", # Required. Query that should be routed to this tool. + "requestParams": { # Request parameters used for executing this tool. + "a_key": "", # Properties of the object. + }, + "responseParams": { # Response parameters generated by this tool. + "a_key": "", # Properties of the object. + }, + "responseSummary": "A String", # Summary of the tool response to the user query. + }, + ], + "updateTime": "A String", # Output only. Timestamp when this Extension was most recently updated. + }, + ], + "nextPageToken": "A String", # A token to retrieve the next page of results. Pass to ListExtensionsRequest.page_token to obtain that page. +}+
list_next()
+ Retrieves the next page of results. + + Args: + previous_request: The request for the previous page. (required) + previous_response: The response from the request for the previous page. (required) + + Returns: + A request object that you can call 'execute()' on to request the next + page. Returns None if there are no more items in the collection. ++
patch(name, body=None, updateMask=None, x__xgafv=None)
+ Updates an Extension. + +Args: + name: string, Identifier. The resource name of the Extension. (required) + body: object, The request body. + The object takes the form of: + +{ # Extensions are tools for large language models to access external data, run computations, etc. + "createTime": "A String", # Output only. Timestamp when this Extension was created. + "description": "A String", # Optional. The description of the Extension. + "displayName": "A String", # Required. The display name of the Extension. The name can be up to 128 characters long and can consist of any UTF-8 characters. + "etag": "A String", # Optional. Used to perform consistent read-modify-write updates. If not set, a blind "overwrite" update happens. + "extensionOperations": [ # Output only. Supported operations. + { # Operation of an extension. + "functionDeclaration": { # Structured representation of a function declaration as defined by the [OpenAPI 3.0 specification](https://spec.openapis.org/oas/v3.0.3). Included in this declaration are the function name and parameters. This FunctionDeclaration is a representation of a block of code that can be used as a `Tool` by the model and executed by the client. # Output only. Structured representation of a function declaration as defined by the OpenAPI Spec. + "description": "A String", # Optional. Description and purpose of the function. Model uses it to decide how and whether to call the function. + "name": "A String", # Required. The name of the function to call. Must start with a letter or an underscore. Must be a-z, A-Z, 0-9, or contain underscores, dots and dashes, with a maximum length of 64. + "parameters": { # Schema is used to define the format of input/output data. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema). More fields may be added in the future as needed. # Optional. Describes the parameters to this function in JSON Schema Object format. Reflects the Open API 3.03 Parameter Object. string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter. For function with no parameters, this can be left unset. Parameter names must start with a letter or an underscore and must only contain chars a-z, A-Z, 0-9, or underscores with a maximum length of 64. Example with 1 required and 1 optional parameter: type: OBJECT properties: param1: type: STRING param2: type: INTEGER required: - param1 + "description": "A String", # Optional. The description of the data. + "enum": [ # Optional. Possible values of the element of Type.STRING with enum format. For example we can define an Enum Direction as : {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]} + "A String", + ], + "example": "", # Optional. Example of the object. Will only populated when the object is the root. + "format": "A String", # Optional. The format of the data. Supported formats: for NUMBER type: float, double for INTEGER type: int32, int64 + "items": # Object with schema name: GoogleCloudAiplatformV1beta1Schema # Optional. Schema of the elements of Type.ARRAY. + "nullable": True or False, # Optional. Indicates if the value may be null. + "properties": { # Optional. Properties of Type.OBJECT. + "a_key": # Object with schema name: GoogleCloudAiplatformV1beta1Schema + }, + "required": [ # Optional. Required properties of Type.OBJECT. + "A String", + ], + "type": "A String", # Optional. The type of the data. + }, + }, + "operationId": "A String", # Operation ID that uniquely identifies the operations among the extension. See: "Operation Object" in https://swagger.io/specification/. This field is parsed from the OpenAPI spec. For HTTP extensions, if it does not exist in the spec, we will generate one from the HTTP method and path. + }, + ], + "manifest": { # Manifest spec of an Extension needed for runtime execution. # Required. Manifest of the Extension. + "apiSpec": { # The API specification shown to the LLM. # Required. Immutable. The API specification shown to the LLM. + "openApiGcsUri": "A String", # Cloud Storage URI pointing to the OpenAPI spec. + "openApiYaml": "A String", # The API spec in Open API standard and YAML format. + }, + "authConfig": { # Auth configuration to run the extension. # Required. Immutable. Type of auth supported by this extension. + "apiKeyConfig": { # Config for authentication with API key. # Config for API key auth. + "apiKeySecret": "A String", # Required. The name of the SecretManager secret version resource storing the API key. Format: `projects/{project}/secrets/{secrete}/versions/{version}` + "httpElementLocation": "A String", # Required. The location of the API key. + "name": "A String", # Required. The parameter name of the API key. E.g. If the API request is "https://example.com/act?api_key=", "api_key" would be the parameter name. + }, + "authType": "A String", # Type of auth scheme. + "googleServiceAccountConfig": { # Config for Google Service Account Authentication. # Config for Google Service Account auth. + "serviceAccount": "A String", # Optional. The service account that the extension execution service runs as. - If it is not specified, the Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) will be used. - If the service account is provided, the service account should grant Vertex AI Extension Service Agent `iam.serviceAccounts.getAccessToken` permission. + }, + "httpBasicAuthConfig": { # Config for HTTP Basic Authentication. # Config for HTTP Basic auth. + "credentialSecret": "A String", # Required. The name of the SecretManager secret version resource storing the base64 encoded credentials. Format: `projects/{project}/secrets/{secrete}/versions/{version}` + }, + "noAuth": { # Empty message, used to indicate no authentication for an endpoint. # Config for no auth. + }, + "oauthConfig": { # Config for user oauth. # Config for user oauth. + "accessToken": "A String", # Access token for extension endpoint. Only used to propagate token from ExecuteExtensionRequest.runtime_auth_config at request time. + "serviceAccount": "A String", # The service account that the extension execution service will use to query extension. Used for generating OAuth token on behalf of provided service account. - If the service account is provided, the service account should grant Vertex AI Service Agent `iam.serviceAccounts.getAccessToken` permission. + }, + "oidcConfig": { # Config for user OIDC auth. # Config for user OIDC auth. + "idToken": "A String", # OpenID Connect formatted ID token for extension endpoint. Only used to propagate token from ExecuteExtensionRequest.runtime_auth_config at request time. + }, + }, + "description": "A String", # Required. The natural language description shown to the LLM. It should describe the usage of the extension, and is essential for the LLM to perform reasoning. + "name": "A String", # Required. Extension name shown to the LLM. The name can be up to 128 characters long. + }, + "name": "A String", # Identifier. The resource name of the Extension. + "toolUseExamples": [ # Optional. Examples to illustrate the usage of the extension as a tool. + { # A single example of the tool usage. + "displayName": "A String", # Required. The display name for example. + "extensionOperation": { # Identifies one operation of the extension. # Extension operation to call. + "extension": "A String", # Resource name of the extension. + "operationId": "A String", # Required. Operation ID of the extension. + }, + "functionName": "A String", # Function name to call. + "query": "A String", # Required. Query that should be routed to this tool. + "requestParams": { # Request parameters used for executing this tool. + "a_key": "", # Properties of the object. + }, + "responseParams": { # Response parameters generated by this tool. + "a_key": "", # Properties of the object. + }, + "responseSummary": "A String", # Summary of the tool response to the user query. + }, + ], + "updateTime": "A String", # Output only. Timestamp when this Extension was most recently updated. +} + + updateMask: string, Required. Mask specifying which fields to update. Supported fields: * `display_name` * `description` + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # Extensions are tools for large language models to access external data, run computations, etc. + "createTime": "A String", # Output only. Timestamp when this Extension was created. + "description": "A String", # Optional. The description of the Extension. + "displayName": "A String", # Required. The display name of the Extension. The name can be up to 128 characters long and can consist of any UTF-8 characters. + "etag": "A String", # Optional. Used to perform consistent read-modify-write updates. If not set, a blind "overwrite" update happens. + "extensionOperations": [ # Output only. Supported operations. + { # Operation of an extension. + "functionDeclaration": { # Structured representation of a function declaration as defined by the [OpenAPI 3.0 specification](https://spec.openapis.org/oas/v3.0.3). Included in this declaration are the function name and parameters. This FunctionDeclaration is a representation of a block of code that can be used as a `Tool` by the model and executed by the client. # Output only. Structured representation of a function declaration as defined by the OpenAPI Spec. + "description": "A String", # Optional. Description and purpose of the function. Model uses it to decide how and whether to call the function. + "name": "A String", # Required. The name of the function to call. Must start with a letter or an underscore. Must be a-z, A-Z, 0-9, or contain underscores, dots and dashes, with a maximum length of 64. + "parameters": { # Schema is used to define the format of input/output data. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema). More fields may be added in the future as needed. # Optional. Describes the parameters to this function in JSON Schema Object format. Reflects the Open API 3.03 Parameter Object. string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter. For function with no parameters, this can be left unset. Parameter names must start with a letter or an underscore and must only contain chars a-z, A-Z, 0-9, or underscores with a maximum length of 64. Example with 1 required and 1 optional parameter: type: OBJECT properties: param1: type: STRING param2: type: INTEGER required: - param1 + "description": "A String", # Optional. The description of the data. + "enum": [ # Optional. Possible values of the element of Type.STRING with enum format. For example we can define an Enum Direction as : {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]} + "A String", + ], + "example": "", # Optional. Example of the object. Will only populated when the object is the root. + "format": "A String", # Optional. The format of the data. Supported formats: for NUMBER type: float, double for INTEGER type: int32, int64 + "items": # Object with schema name: GoogleCloudAiplatformV1beta1Schema # Optional. Schema of the elements of Type.ARRAY. + "nullable": True or False, # Optional. Indicates if the value may be null. + "properties": { # Optional. Properties of Type.OBJECT. + "a_key": # Object with schema name: GoogleCloudAiplatformV1beta1Schema + }, + "required": [ # Optional. Required properties of Type.OBJECT. + "A String", + ], + "type": "A String", # Optional. The type of the data. + }, + }, + "operationId": "A String", # Operation ID that uniquely identifies the operations among the extension. See: "Operation Object" in https://swagger.io/specification/. This field is parsed from the OpenAPI spec. For HTTP extensions, if it does not exist in the spec, we will generate one from the HTTP method and path. + }, + ], + "manifest": { # Manifest spec of an Extension needed for runtime execution. # Required. Manifest of the Extension. + "apiSpec": { # The API specification shown to the LLM. # Required. Immutable. The API specification shown to the LLM. + "openApiGcsUri": "A String", # Cloud Storage URI pointing to the OpenAPI spec. + "openApiYaml": "A String", # The API spec in Open API standard and YAML format. + }, + "authConfig": { # Auth configuration to run the extension. # Required. Immutable. Type of auth supported by this extension. + "apiKeyConfig": { # Config for authentication with API key. # Config for API key auth. + "apiKeySecret": "A String", # Required. The name of the SecretManager secret version resource storing the API key. Format: `projects/{project}/secrets/{secrete}/versions/{version}` + "httpElementLocation": "A String", # Required. The location of the API key. + "name": "A String", # Required. The parameter name of the API key. E.g. If the API request is "https://example.com/act?api_key=", "api_key" would be the parameter name. + }, + "authType": "A String", # Type of auth scheme. + "googleServiceAccountConfig": { # Config for Google Service Account Authentication. # Config for Google Service Account auth. + "serviceAccount": "A String", # Optional. The service account that the extension execution service runs as. - If it is not specified, the Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) will be used. - If the service account is provided, the service account should grant Vertex AI Extension Service Agent `iam.serviceAccounts.getAccessToken` permission. + }, + "httpBasicAuthConfig": { # Config for HTTP Basic Authentication. # Config for HTTP Basic auth. + "credentialSecret": "A String", # Required. The name of the SecretManager secret version resource storing the base64 encoded credentials. Format: `projects/{project}/secrets/{secrete}/versions/{version}` + }, + "noAuth": { # Empty message, used to indicate no authentication for an endpoint. # Config for no auth. + }, + "oauthConfig": { # Config for user oauth. # Config for user oauth. + "accessToken": "A String", # Access token for extension endpoint. Only used to propagate token from ExecuteExtensionRequest.runtime_auth_config at request time. + "serviceAccount": "A String", # The service account that the extension execution service will use to query extension. Used for generating OAuth token on behalf of provided service account. - If the service account is provided, the service account should grant Vertex AI Service Agent `iam.serviceAccounts.getAccessToken` permission. + }, + "oidcConfig": { # Config for user OIDC auth. # Config for user OIDC auth. + "idToken": "A String", # OpenID Connect formatted ID token for extension endpoint. Only used to propagate token from ExecuteExtensionRequest.runtime_auth_config at request time. + }, + }, + "description": "A String", # Required. The natural language description shown to the LLM. It should describe the usage of the extension, and is essential for the LLM to perform reasoning. + "name": "A String", # Required. Extension name shown to the LLM. The name can be up to 128 characters long. + }, + "name": "A String", # Identifier. The resource name of the Extension. + "toolUseExamples": [ # Optional. Examples to illustrate the usage of the extension as a tool. + { # A single example of the tool usage. + "displayName": "A String", # Required. The display name for example. + "extensionOperation": { # Identifies one operation of the extension. # Extension operation to call. + "extension": "A String", # Resource name of the extension. + "operationId": "A String", # Required. Operation ID of the extension. + }, + "functionName": "A String", # Function name to call. + "query": "A String", # Required. Query that should be routed to this tool. + "requestParams": { # Request parameters used for executing this tool. + "a_key": "", # Properties of the object. + }, + "responseParams": { # Response parameters generated by this tool. + "a_key": "", # Properties of the object. + }, + "responseSummary": "A String", # Summary of the tool response to the user query. + }, + ], + "updateTime": "A String", # Output only. Timestamp when this Extension was most recently updated. +}+