Skip to content

Commit

Permalink
Support access_credentials_name in UDF/Delayed/DAG apis (#389)
Browse files Browse the repository at this point in the history
* Update generated API

* Support access_credentials_name in UDF/Delayed/DAG apis
  • Loading branch information
Shelnutt2 authored Apr 20, 2023
1 parent a4135be commit cc7f85b
Show file tree
Hide file tree
Showing 164 changed files with 14,841 additions and 149 deletions.
26 changes: 25 additions & 1 deletion src/tiledb/cloud/_common/api_v2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ with tiledb.cloud._common.api_v2.ApiClient(configuration) as api_client:
array = 'array_example' # str | name/uri of array that is url-encoded
start = 56 # int | Start time of window of fetch logs, unix epoch in seconds (default: seven days ago) (optional)
end = 56 # int | End time of window of fetch logs, unix epoch in seconds (default: current utc timestamp) (optional)
event_types = ['event_types_example'] # list[str] | Event values can be one or more of the following read, write, create, delete, register, deregister, comma separated (optional)
event_types = ['event_types_example'] # list[str] | Refer to ActivityEventType for possible values (optional)
task_id = 'task_id_example' # str | Array task id To filter activity to (optional)
has_task_id = True # bool | Excludes activity log results that does not contain an array task uuid (optional)
page = 56 # int | pagination offset (optional)
Expand All @@ -92,6 +92,7 @@ All URIs are relative to *http://localhost*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*ArrayApi* | [**array_activity_log**](docs/ArrayApi.md#array_activity_log) | **GET** /v2/arrays/{namespace}/{array}/activity |
*ArrayApi* | [**get_array**](docs/ArrayApi.md#get_array) | **POST** /v2/arrays/{namespace}/{array} |
*FilesApi* | [**handle_upload_file**](docs/FilesApi.md#handle_upload_file) | **POST** /v2/files/{namespace}/{array}/upload |
*GroupsApi* | [**create_group**](docs/GroupsApi.md#create_group) | **POST** /v2/groups/{group_namespace} |
*GroupsApi* | [**deregister_group**](docs/GroupsApi.md#deregister_group) | **DELETE** /v2/groups/{group_namespace}/{group_name} |
Expand Down Expand Up @@ -126,14 +127,34 @@ Class | Method | HTTP request | Description
- [Array](docs/Array.md)
- [ArrayActivityLog](docs/ArrayActivityLog.md)
- [ArrayActivityLogData](docs/ArrayActivityLogData.md)
- [ArrayDirectory](docs/ArrayDirectory.md)
- [ArrayFetch](docs/ArrayFetch.md)
- [ArrayMetadata](docs/ArrayMetadata.md)
- [ArrayMetadataEntry](docs/ArrayMetadataEntry.md)
- [ArraySchema](docs/ArraySchema.md)
- [ArraySchemaEntry](docs/ArraySchemaEntry.md)
- [ArraySchemaMap](docs/ArraySchemaMap.md)
- [ArrayType](docs/ArrayType.md)
- [Attribute](docs/Attribute.md)
- [AttributeBufferHeader](docs/AttributeBufferHeader.md)
- [AttributeBufferSize](docs/AttributeBufferSize.md)
- [AzureCredential](docs/AzureCredential.md)
- [CloudProvider](docs/CloudProvider.md)
- [Datatype](docs/Datatype.md)
- [DeleteAndUpdateTileLocation](docs/DeleteAndUpdateTileLocation.md)
- [Dimension](docs/Dimension.md)
- [DimensionTileExtent](docs/DimensionTileExtent.md)
- [Domain](docs/Domain.md)
- [DomainArray](docs/DomainArray.md)
- [Error](docs/Error.md)
- [FileUploaded](docs/FileUploaded.md)
- [Filter](docs/Filter.md)
- [FilterData](docs/FilterData.md)
- [FilterPipeline](docs/FilterPipeline.md)
- [FilterType](docs/FilterType.md)
- [FloatScaleConfig](docs/FloatScaleConfig.md)
- [FragmentMetadata](docs/FragmentMetadata.md)
- [GenericTileOffsets](docs/GenericTileOffsets.md)
- [GroupContentsChangesRequest](docs/GroupContentsChangesRequest.md)
- [GroupContentsChangesRequestGroupChanges](docs/GroupContentsChangesRequestGroupChanges.md)
- [GroupContentsRetrievalRequest](docs/GroupContentsRetrievalRequest.md)
Expand All @@ -150,6 +171,8 @@ Class | Method | HTTP request | Description
- [Layout](docs/Layout.md)
- [Metadata](docs/Metadata.md)
- [MetadataEntry](docs/MetadataEntry.md)
- [NonEmptyDomain](docs/NonEmptyDomain.md)
- [NonEmptyDomainList](docs/NonEmptyDomainList.md)
- [PaginationMetadata](docs/PaginationMetadata.md)
- [Query](docs/Query.md)
- [QueryReader](docs/QueryReader.md)
Expand All @@ -163,6 +186,7 @@ Class | Method | HTTP request | Description
- [SubarrayRanges](docs/SubarrayRanges.md)
- [TileDBConfig](docs/TileDBConfig.md)
- [TileDBConfigEntries](docs/TileDBConfigEntries.md)
- [TimestampedURI](docs/TimestampedURI.md)
- [Writer](docs/Writer.md)


Expand Down
25 changes: 25 additions & 0 deletions src/tiledb/cloud/_common/api_v2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,15 @@
from tiledb.cloud._common.api_v2.models.array_activity_log_data import (
ArrayActivityLogData,
)
from tiledb.cloud._common.api_v2.models.array_directory import ArrayDirectory
from tiledb.cloud._common.api_v2.models.array_fetch import ArrayFetch
from tiledb.cloud._common.api_v2.models.array_metadata import ArrayMetadata
from tiledb.cloud._common.api_v2.models.array_metadata_entry import ArrayMetadataEntry
from tiledb.cloud._common.api_v2.models.array_schema import ArraySchema
from tiledb.cloud._common.api_v2.models.array_schema_entry import ArraySchemaEntry
from tiledb.cloud._common.api_v2.models.array_schema_map import ArraySchemaMap
from tiledb.cloud._common.api_v2.models.array_type import ArrayType
from tiledb.cloud._common.api_v2.models.attribute import Attribute
from tiledb.cloud._common.api_v2.models.attribute_buffer_header import (
AttributeBufferHeader,
)
Expand All @@ -59,9 +68,22 @@
from tiledb.cloud._common.api_v2.models.azure_credential import AzureCredential
from tiledb.cloud._common.api_v2.models.cloud_provider import CloudProvider
from tiledb.cloud._common.api_v2.models.datatype import Datatype
from tiledb.cloud._common.api_v2.models.delete_and_update_tile_location import (
DeleteAndUpdateTileLocation,
)
from tiledb.cloud._common.api_v2.models.dimension import Dimension
from tiledb.cloud._common.api_v2.models.dimension_tile_extent import DimensionTileExtent
from tiledb.cloud._common.api_v2.models.domain import Domain
from tiledb.cloud._common.api_v2.models.domain_array import DomainArray
from tiledb.cloud._common.api_v2.models.error import Error
from tiledb.cloud._common.api_v2.models.file_uploaded import FileUploaded
from tiledb.cloud._common.api_v2.models.filter import Filter
from tiledb.cloud._common.api_v2.models.filter_data import FilterData
from tiledb.cloud._common.api_v2.models.filter_pipeline import FilterPipeline
from tiledb.cloud._common.api_v2.models.filter_type import FilterType
from tiledb.cloud._common.api_v2.models.float_scale_config import FloatScaleConfig
from tiledb.cloud._common.api_v2.models.fragment_metadata import FragmentMetadata
from tiledb.cloud._common.api_v2.models.generic_tile_offsets import GenericTileOffsets
from tiledb.cloud._common.api_v2.models.group_contents_changes_request import (
GroupContentsChangesRequest,
)
Expand Down Expand Up @@ -100,6 +122,8 @@
from tiledb.cloud._common.api_v2.models.layout import Layout
from tiledb.cloud._common.api_v2.models.metadata import Metadata
from tiledb.cloud._common.api_v2.models.metadata_entry import MetadataEntry
from tiledb.cloud._common.api_v2.models.non_empty_domain import NonEmptyDomain
from tiledb.cloud._common.api_v2.models.non_empty_domain_list import NonEmptyDomainList
from tiledb.cloud._common.api_v2.models.pagination_metadata import PaginationMetadata
from tiledb.cloud._common.api_v2.models.query import Query
from tiledb.cloud._common.api_v2.models.query_reader import QueryReader
Expand All @@ -119,4 +143,5 @@
from tiledb.cloud._common.api_v2.models.tile_db_config_entries import (
TileDBConfigEntries,
)
from tiledb.cloud._common.api_v2.models.timestamped_uri import TimestampedURI
from tiledb.cloud._common.api_v2.models.writer import Writer
176 changes: 174 additions & 2 deletions src/tiledb/cloud/_common/api_v2/api/array_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def array_activity_log(self, namespace, array, **kwargs): # noqa: E501
:param str array: name/uri of array that is url-encoded (required)
:param int start: Start time of window of fetch logs, unix epoch in seconds (default: seven days ago)
:param int end: End time of window of fetch logs, unix epoch in seconds (default: current utc timestamp)
:param list[str] event_types: Event values can be one or more of the following read, write, create, delete, register, deregister, comma separated
:param list[str] event_types: Refer to ActivityEventType for possible values
:param str task_id: Array task id To filter activity to
:param bool has_task_id: Excludes activity log results that does not contain an array task uuid
:param int page: pagination offset
Expand Down Expand Up @@ -85,7 +85,7 @@ def array_activity_log_with_http_info(
:param str array: name/uri of array that is url-encoded (required)
:param int start: Start time of window of fetch logs, unix epoch in seconds (default: seven days ago)
:param int end: End time of window of fetch logs, unix epoch in seconds (default: current utc timestamp)
:param list[str] event_types: Event values can be one or more of the following read, write, create, delete, register, deregister, comma separated
:param list[str] event_types: Refer to ActivityEventType for possible values
:param str task_id: Array task id To filter activity to
:param bool has_task_id: Excludes activity log results that does not contain an array task uuid
:param int page: pagination offset
Expand Down Expand Up @@ -231,3 +231,175 @@ def array_activity_log_with_http_info(
_request_timeout=local_var_params.get("_request_timeout"),
collection_formats=collection_formats,
)

def get_array(
self, namespace, array, content_type, array_fetch, **kwargs
): # noqa: E501
"""get_array # noqa: E501
Get a array at a specified URI registered to a group/project # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_array(namespace, array, content_type, array_fetch, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
:param str namespace: namespace array is in (an organization name or user's username) (required)
:param str array: name/uri of array that is url-encoded (required)
:param str content_type: Content Type of input and return mime (required)
:param ArrayFetch array_fetch: Details for array being fetched (required)
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: Array
If the method is called asynchronously,
returns the request thread.
"""
kwargs["_return_http_data_only"] = True
return self.get_array_with_http_info(
namespace, array, content_type, array_fetch, **kwargs
) # noqa: E501

def get_array_with_http_info(
self, namespace, array, content_type, array_fetch, **kwargs
): # noqa: E501
"""get_array # noqa: E501
Get a array at a specified URI registered to a group/project # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_array_with_http_info(namespace, array, content_type, array_fetch, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
:param str namespace: namespace array is in (an organization name or user's username) (required)
:param str array: name/uri of array that is url-encoded (required)
:param str content_type: Content Type of input and return mime (required)
:param ArrayFetch array_fetch: Details for array being fetched (required)
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: tuple(Array, status_code(int), headers(HTTPHeaderDict))
If the method is called asynchronously,
returns the request thread.
"""

local_var_params = locals()

all_params = ["namespace", "array", "content_type", "array_fetch"]
all_params.extend(
[
"async_req",
"_return_http_data_only",
"_preload_content",
"_request_timeout",
]
)

for key, val in six.iteritems(local_var_params["kwargs"]):
if key not in all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
" to method get_array" % key
)
local_var_params[key] = val
del local_var_params["kwargs"]
# verify the required parameter 'namespace' is set
if self.api_client.client_side_validation and (
"namespace" not in local_var_params
or local_var_params["namespace"] is None # noqa: E501
): # noqa: E501
raise ApiValueError(
"Missing the required parameter `namespace` when calling `get_array`"
) # noqa: E501
# verify the required parameter 'array' is set
if self.api_client.client_side_validation and (
"array" not in local_var_params
or local_var_params["array"] is None # noqa: E501
): # noqa: E501
raise ApiValueError(
"Missing the required parameter `array` when calling `get_array`"
) # noqa: E501
# verify the required parameter 'content_type' is set
if self.api_client.client_side_validation and (
"content_type" not in local_var_params
or local_var_params["content_type"] is None # noqa: E501
): # noqa: E501
raise ApiValueError(
"Missing the required parameter `content_type` when calling `get_array`"
) # noqa: E501
# verify the required parameter 'array_fetch' is set
if self.api_client.client_side_validation and (
"array_fetch" not in local_var_params
or local_var_params["array_fetch"] is None # noqa: E501
): # noqa: E501
raise ApiValueError(
"Missing the required parameter `array_fetch` when calling `get_array`"
) # noqa: E501

collection_formats = {}

path_params = {}
if "namespace" in local_var_params:
path_params["namespace"] = local_var_params["namespace"] # noqa: E501
if "array" in local_var_params:
path_params["array"] = local_var_params["array"] # noqa: E501

query_params = []

header_params = {}
if "content_type" in local_var_params:
header_params["Content-Type"] = local_var_params[
"content_type"
] # noqa: E501

form_params = []
local_var_files = {}

body_params = None
if "array_fetch" in local_var_params:
body_params = local_var_params["array_fetch"]
# HTTP header `Accept`
header_params["Accept"] = self.api_client.select_header_accept(
["application/json"]
) # noqa: E501

# HTTP header `Content-Type`
header_params[
"Content-Type"
] = self.api_client.select_header_content_type( # noqa: E501
["application/json"]
) # noqa: E501

# Authentication setting
auth_settings = ["ApiKeyAuth", "BasicAuth"] # noqa: E501

return self.api_client.call_api(
"/v2/arrays/{namespace}/{array}",
"POST",
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type="Array", # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get("async_req"),
_return_http_data_only=local_var_params.get(
"_return_http_data_only"
), # noqa: E501
_preload_content=local_var_params.get("_preload_content", True),
_request_timeout=local_var_params.get("_request_timeout"),
collection_formats=collection_formats,
)
1 change: 1 addition & 0 deletions src/tiledb/cloud/_common/api_v2/docs/AccessCredential.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Name | Type | Description | Notes
**provider_default** | **bool** | True if this is the namespace's default credential to be used when connecting to the given cloud provider. There can be at most one default for each unique provider. | [optional]
**created_at** | **datetime** | Time when the credential was created (rfc3339) | [optional] [readonly]
**updated_at** | **datetime** | Time when the credential was last updated (rfc3339) | [optional] [readonly]
**allowed_in_tasks** | **bool** | Is this credential allowed to be used in tasks | [optional]
**credential** | [**AccessCredentialCredential**](AccessCredentialCredential.md) | | [optional]
**role** | [**AccessCredentialRole**](AccessCredentialRole.md) | | [optional]

Expand Down
10 changes: 9 additions & 1 deletion src/tiledb/cloud/_common/api_v2/docs/Array.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,17 @@ Represents an open array
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**timestamp** | **float** | timestamp (epoch milliseconds) array is opened at |
**query_type** | [**Querytype**](Querytype.md) | |
**uri** | **str** | Array uri |
**end_timestamp** | **float** | Ending timestamp (epoch milliseconds) array is opened at | [optional]
**start_timestamp** | **float** | Starting timestamp (epoch milliseconds) array is opened at | [optional]
**array_schema_latest** | [**ArraySchema**](ArraySchema.md) | | [optional]
**array_schemas_all** | [**ArraySchemaMap**](ArraySchemaMap.md) | | [optional]
**array_metadata** | [**ArrayMetadata**](ArrayMetadata.md) | | [optional]
**non_empty_domain** | [**NonEmptyDomainList**](NonEmptyDomainList.md) | | [optional]
**array_directory** | [**ArrayDirectory**](ArrayDirectory.md) | | [optional]
**fragment_metadata_all** | [**list[FragmentMetadata]**](FragmentMetadata.md) | metadata for all fragments (for reads) | [optional]
**opened_at_end_timestamp** | **float** | The ending timestamp that the array was last opened at | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Expand Down
Loading

0 comments on commit cc7f85b

Please sign in to comment.