Skip to content

create_kx_dataview async

create_kx_dataview(
    environment_id: EnvironmentId,
    database_name: DatabaseName,
    dataview_name: KxDataviewName,
    az_mode: KxAzMode,
    client_token: ClientTokenString,
    *,
    config_overrides: Optional[AsyncfinspaceClientConfig] = None,
    availability_zone_id: Optional[AvailabilityZoneId] = None,
    changeset_id: Optional[ChangesetId] = None,
    segment_configurations: Optional[KxDataviewSegmentConfigurationList] = None,
    auto_update: Optional[booleanValue] = None,
    read_write: Optional[booleanValue] = None,
    description: Optional[Description] = None,
    tags: Optional[TagMap] = None,
) -> CreateKxDataviewResponse

Creates a snapshot of kdb database with tiered storage capabilities and a pre-warmed cache, ready for mounting on kdb clusters. Dataviews are only available for clusters running on a scaling group. They are not supported on dedicated clusters.

Parameters:

  • environment_id (EnvironmentId) –

    A unique identifier for the kdb environment, where you want to create the dataview.

  • database_name (DatabaseName) –

    The name of the database where you want to create a dataview.

  • dataview_name (KxDataviewName) –

    A unique identifier for the dataview.

  • az_mode (KxAzMode) –

    The number of availability zones you want to assign per volume. Currently, FinSpace only supports SINGLE for volumes. This places dataview in a single AZ.

  • availability_zone_id (Optional[AvailabilityZoneId], default: None ) –

    The identifier of the availability zones.

  • changeset_id (Optional[ChangesetId], default: None ) –

    A unique identifier of the changeset that you want to use to ingest data.

  • segment_configurations (Optional[KxDataviewSegmentConfigurationList], default: None ) –

    The configuration that contains the database path of the data that you want to place on each selected volume. Each segment must have a unique database path for each volume. If you do not explicitly specify any database path for a volume, they are accessible from the cluster through the default S3/object store segment.

  • auto_update (Optional[booleanValue], default: None ) –

    The option to specify whether you want to apply all the future additions and corrections automatically to the dataview, when you ingest new changesets. The default value is false.

  • read_write (Optional[booleanValue], default: None ) –

    The option to specify whether you want to make the dataview writable to perform database maintenance. The following are some considerations related to writable dataviews.

    • You cannot create partial writable dataviews. When you create writeable dataviews you must provide the entire database path.

    • You cannot perform updates on a writeable dataview. Hence, autoUpdate must be set as False if readWrite is True for a dataview.

    • You must also use a unique volume for creating a writeable dataview. So, if you choose a volume that is already in use by another dataview, the dataview creation fails.

    • Once you create a dataview as writeable, you cannot change it to read-only. So, you cannot update the readWrite parameter later.

  • description (Optional[Description], default: None ) –

    A description of the dataview.

  • tags (Optional[TagMap], default: None ) –

    A list of key-value pairs to label the dataview. You can add up to 50 tags to a dataview.

  • client_token (ClientTokenString) –

    A token that ensures idempotency. This token expires in 10 minutes.

Raises:

Source code in docs_src/capo_finspace/_services/async_finspace.py
async def create_kx_dataview(
    self,
    environment_id: "capo_finspace.types.environment_id.EnvironmentId",
    database_name: "capo_finspace.types.database_name.DatabaseName",
    dataview_name: "capo_finspace.types.kx_dataview_name.KxDataviewName",
    az_mode: "capo_finspace.types.kx_az_mode.KxAzMode",
    client_token: "capo_finspace.types.client_token_string.ClientTokenString",
    *,
    config_overrides: Optional[AsyncfinspaceClientConfig] = None,
    availability_zone_id: Optional[
        "capo_finspace.types.availability_zone_id.AvailabilityZoneId"
    ] = None,
    changeset_id: Optional["capo_finspace.types.changeset_id.ChangesetId"] = None,
    segment_configurations: Optional[
        "capo_finspace.types.kx_dataview_segment_configuration_list.KxDataviewSegmentConfigurationList"
    ] = None,
    auto_update: Optional["capo_finspace.types.boolean_value.booleanValue"] = None,
    read_write: Optional["capo_finspace.types.boolean_value.booleanValue"] = None,
    description: Optional["capo_finspace.types.description.Description"] = None,
    tags: Optional["capo_finspace.types.tag_map.TagMap"] = None,
) -> "capo_finspace.types.create_kx_dataview_response.CreateKxDataviewResponse":
    """<p> Creates a snapshot of kdb database with tiered storage capabilities and a pre-warmed cache, ready for mounting on kdb clusters. Dataviews are only available for clusters running on a scaling group. They are not supported on dedicated clusters. </p>

    Args:
        environment_id: <p>A unique identifier for the kdb environment, where you want to create the dataview. </p>
        database_name: <p> The name of the database where you want to create a dataview. </p>
        dataview_name: <p>A unique identifier for the dataview.</p>
        az_mode: <p>The number of availability zones you want to assign per volume. Currently, FinSpace only supports <code>SINGLE</code> for volumes. This places dataview in a single AZ.</p>
        availability_zone_id: <p> The identifier of the availability zones. </p>
        changeset_id: <p> A unique identifier of the changeset that you want to use to ingest data. </p>
        segment_configurations: <p> The configuration that contains the database path of the data that you want to place on each selected volume. Each segment must have a unique database path for each volume. If you do not explicitly specify any database path for a volume, they are accessible from the cluster through the default S3/object store segment. </p>
        auto_update: <p>The option to specify whether you want to apply all the future additions and corrections automatically to the dataview, when you ingest new changesets. The default value is false.</p>
        read_write: <p> The option to specify whether you want to make the dataview writable to perform database maintenance. The following are some considerations related to writable dataviews. </p> <ul> <li> <p>You cannot create partial writable dataviews. When you create writeable dataviews you must provide the entire database path.</p> </li> <li> <p>You cannot perform updates on a writeable dataview. Hence, <code>autoUpdate</code> must be set as <b>False</b> if <code>readWrite</code> is <b>True</b> for a dataview.</p> </li> <li> <p>You must also use a unique volume for creating a writeable dataview. So, if you choose a volume that is already in use by another dataview, the dataview creation fails.</p> </li> <li> <p>Once you create a dataview as writeable, you cannot change it to read-only. So, you cannot update the <code>readWrite</code> parameter later.</p> </li> </ul>
        description: <p>A description of the dataview.</p>
        tags: <p> A list of key-value pairs to label the dataview. You can add up to 50 tags to a dataview. </p>
        client_token: <p>A token that ensures idempotency. This token expires in 10 minutes.</p>

    Raises:
        capo_finspace.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_finspace.errors.conflict_exception.ConflictException: <p>There was a conflict with this action, and it could not be completed.</p>
        capo_finspace.errors.internal_server_exception.InternalServerException: <p>The request processing has failed because of an unknown error, exception or failure.</p>
        capo_finspace.errors.limit_exceeded_exception.LimitExceededException: <p>A service limit or quota is exceeded.</p>
        capo_finspace.errors.resource_already_exists_exception.ResourceAlreadyExistsException: <p>The specified resource group already exists.</p>
        capo_finspace.errors.resource_not_found_exception.ResourceNotFoundException: <p>One or more resources can't be found.</p>
        capo_finspace.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_finspace.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an AWS service.</p>
        capo_finspace.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_finspace.types.create_kx_dataview_request.CreateKxDataviewRequest]",
    ) -> AsyncOperationResponse[
        "capo_finspace.types.create_kx_dataview_response.CreateKxDataviewResponse"
    ]:
        import capo_finspace._operations.aws_habanero_management_service.create_kx_dataview

        (
            output,
            http_response,
        ) = await capo_finspace._operations.aws_habanero_management_service.create_kx_dataview.async_create_kx_dataview(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateKxDataview")
    )
    input_: capo_finspace.types.create_kx_dataview_request.CreateKxDataviewRequest = {
        "environment_id": environment_id,
        "database_name": database_name,
        "dataview_name": dataview_name,
        "az_mode": az_mode,
        "client_token": client_token,
    }
    if availability_zone_id is not None:
        input_["availability_zone_id"] = availability_zone_id
    if changeset_id is not None:
        input_["changeset_id"] = changeset_id
    if segment_configurations is not None:
        input_["segment_configurations"] = segment_configurations
    if auto_update is not None:
        input_["auto_update"] = auto_update
    if read_write is not None:
        input_["read_write"] = read_write
    if description is not None:
        input_["description"] = description
    if tags is not None:
        input_["tags"] = tags

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output