Skip to content

update_data_lake_namespace async

update_data_lake_namespace(
    instance_id: UUID,
    name: DataLakeNamespaceName,
    *,
    config_overrides: Optional[AsyncSupplyChainClientConfig] = None,
    description: Optional[DataLakeNamespaceDescription] = None,
) -> UpdateDataLakeNamespaceResponse

Enables you to programmatically update an Amazon Web Services Supply Chain data lake namespace. Developers can update the description of a data lake namespace for a given instance ID and namespace name.

Parameters:

  • instance_id (UUID) –

    The Amazon Web Services Chain instance identifier.

  • name (DataLakeNamespaceName) –

    The name of the namespace. Noted you cannot update namespace with name starting with asc, default, scn, aws, amazon, amzn

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

    The updated description of the data lake namespace.

Raises:

Examples:

Update description of an existing AWS Supply Chain namespace

>>> await client.update_data_lake_namespace(instance_id='1877dd20-dee9-4639-8e99-cb67acf21fe5', name='my_namespace', description='This is an updated AWS Supply Chain namespace')
Source code in docs_src/capo_supplychain/_services/async_supply_chain.py
async def update_data_lake_namespace(
    self,
    instance_id: "capo_supplychain.types.uuid.UUID",
    name: "capo_supplychain.types.data_lake_namespace_name.DataLakeNamespaceName",
    *,
    config_overrides: Optional[AsyncSupplyChainClientConfig] = None,
    description: Optional[
        "capo_supplychain.types.data_lake_namespace_description.DataLakeNamespaceDescription"
    ] = None,
) -> "capo_supplychain.types.update_data_lake_namespace_response.UpdateDataLakeNamespaceResponse":
    """<p>Enables you to programmatically update an Amazon Web Services Supply Chain data lake namespace. Developers can update the description of a data lake namespace for a given instance ID and namespace name.</p>

    Args:
        instance_id: <p>The Amazon Web Services Chain instance identifier.</p>
        name: <p>The name of the namespace. Noted you cannot update namespace with name starting with <b>asc</b>, <b>default</b>, <b>scn</b>, <b>aws</b>, <b>amazon</b>, <b>amzn</b> </p>
        description: <p>The updated description of the data lake namespace.</p>

    Raises:
        capo_supplychain.errors.access_denied_exception.AccessDeniedException: <p>You do not have the required privileges to perform this action.</p>
        capo_supplychain.errors.conflict_exception.ConflictException: <p>Updating or deleting a resource can cause an inconsistent state.</p>
        capo_supplychain.errors.internal_server_exception.InternalServerException: <p>Unexpected error during processing of request.</p>
        capo_supplychain.errors.resource_not_found_exception.ResourceNotFoundException: <p>Request references a resource which does not exist.</p>
        capo_supplychain.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>Request would cause a service quota to be exceeded.</p>
        capo_supplychain.errors.throttling_exception.ThrottlingException: <p>Request was denied due to request throttling.</p>
        capo_supplychain.errors.validation_exception.ValidationException: <p>The input does not satisfy the constraints specified by an AWS service.</p>
        capo_supplychain.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        Update description of an existing AWS Supply Chain namespace

        >>> await client.update_data_lake_namespace(instance_id='1877dd20-dee9-4639-8e99-cb67acf21fe5', name='my_namespace', description='This is an updated AWS Supply Chain namespace')
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_supplychain.types.update_data_lake_namespace_request.UpdateDataLakeNamespaceRequest]",
    ) -> AsyncOperationResponse[
        "capo_supplychain.types.update_data_lake_namespace_response.UpdateDataLakeNamespaceResponse"
    ]:
        import capo_supplychain._operations.galaxy_public_api_gateway.update_data_lake_namespace

        (
            output,
            http_response,
        ) = await capo_supplychain._operations.galaxy_public_api_gateway.update_data_lake_namespace.async_update_data_lake_namespace(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateDataLakeNamespace")
    )
    input_: capo_supplychain.types.update_data_lake_namespace_request.UpdateDataLakeNamespaceRequest = {
        "instance_id": instance_id,
        "name": name,
    }
    if description is not None:
        input_["description"] = description

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