Skip to content

create_kx_volume async

create_kx_volume(
    environment_id: KxEnvironmentId,
    volume_type: KxVolumeType,
    volume_name: KxVolumeName,
    az_mode: KxAzMode,
    availability_zone_ids: AvailabilityZoneIds,
    *,
    config_overrides: Optional[AsyncfinspaceClientConfig] = None,
    client_token: Optional[ClientToken] = None,
    description: Optional[Description] = None,
    nas1_configuration: Optional[KxNAS1Configuration] = None,
    tags: Optional[TagMap] = None,
) -> CreateKxVolumeResponse

Creates a new volume with a specific amount of throughput and storage capacity.

Parameters:

  • client_token (Optional[ClientToken], default: None ) –

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

  • environment_id (KxEnvironmentId) –

    A unique identifier for the kdb environment, whose clusters can attach to the volume.

  • volume_type (KxVolumeType) –

    The type of file system volume. Currently, FinSpace only supports NAS_1 volume type. When you select NAS_1 volume type, you must also provide nas1Configuration.

  • volume_name (KxVolumeName) –

    A unique identifier for the volume.

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

    A description of the volume.

  • nas1_configuration (Optional[KxNAS1Configuration], default: None ) –

    Specifies the configuration for the Network attached storage (NAS_1) file system volume. This parameter is required when you choose volumeType as NAS_1.

  • 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_ids (AvailabilityZoneIds) –

    The identifier of the availability zones.

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

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

Raises:

Source code in docs_src/capo_finspace/_services/async_finspace.py
async def create_kx_volume(
    self,
    environment_id: "capo_finspace.types.kx_environment_id.KxEnvironmentId",
    volume_type: "capo_finspace.types.kx_volume_type.KxVolumeType",
    volume_name: "capo_finspace.types.kx_volume_name.KxVolumeName",
    az_mode: "capo_finspace.types.kx_az_mode.KxAzMode",
    availability_zone_ids: "capo_finspace.types.availability_zone_ids.AvailabilityZoneIds",
    *,
    config_overrides: Optional[AsyncfinspaceClientConfig] = None,
    client_token: Optional["capo_finspace.types.client_token.ClientToken"] = None,
    description: Optional["capo_finspace.types.description.Description"] = None,
    nas1_configuration: Optional[
        "capo_finspace.types.kx_nas1_configuration.KxNAS1Configuration"
    ] = None,
    tags: Optional["capo_finspace.types.tag_map.TagMap"] = None,
) -> "capo_finspace.types.create_kx_volume_response.CreateKxVolumeResponse":
    """<p> Creates a new volume with a specific amount of throughput and storage capacity. </p>

    Args:
        client_token: <p>A token that ensures idempotency. This token expires in 10 minutes.</p>
        environment_id: <p>A unique identifier for the kdb environment, whose clusters can attach to the volume. </p>
        volume_type: <p> The type of file system volume. Currently, FinSpace only supports <code>NAS_1</code> volume type. When you select <code>NAS_1</code> volume type, you must also provide <code>nas1Configuration</code>. </p>
        volume_name: <p>A unique identifier for the volume.</p>
        description: <p> A description of the volume. </p>
        nas1_configuration: <p> Specifies the configuration for the Network attached storage (NAS_1) file system volume. This parameter is required when you choose <code>volumeType</code> as <i>NAS_1</i>.</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_ids: <p>The identifier of the availability zones.</p>
        tags: <p> A list of key-value pairs to label the volume. You can add up to 50 tags to a volume. </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_volume_request.CreateKxVolumeRequest]",
    ) -> AsyncOperationResponse[
        "capo_finspace.types.create_kx_volume_response.CreateKxVolumeResponse"
    ]:
        import capo_finspace._operations.aws_habanero_management_service.create_kx_volume

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateKxVolume")
    )
    input_: capo_finspace.types.create_kx_volume_request.CreateKxVolumeRequest = {
        "environment_id": environment_id,
        "volume_type": volume_type,
        "volume_name": volume_name,
        "az_mode": az_mode,
        "availability_zone_ids": availability_zone_ids,
    }
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token
    if description is not None:
        input_["description"] = description
    if nas1_configuration is not None:
        input_["nas1_configuration"] = nas1_configuration
    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