Skip to content

create_revision

create_revision(
    data_set_id: Id,
    *,
    config_overrides: Optional[DataExchangeClientConfig] = None,
    comment: Optional[__stringMin0Max16384] = None,
    tags: Optional[MapOf__string] = None,
) -> CreateRevisionResponse

This operation creates a revision for a data set.

Parameters:

  • comment (Optional[__stringMin0Max16384], default: None ) –

    An optional comment about the revision.

  • data_set_id (Id) –

    The unique identifier for a data set.

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

    A revision tag is an optional label that you can assign to a revision when you create it. Each tag consists of a key and an optional value, both of which you define. When you use tagging, you can also use tag-based access control in IAM policies to control access to these data sets and revisions.

Raises:

Source code in docs_src/capo_dataexchange/_services/data_exchange.py
def create_revision(
    self,
    data_set_id: "capo_dataexchange.types.id.Id",
    *,
    config_overrides: Optional[DataExchangeClientConfig] = None,
    comment: Optional[
        "capo_dataexchange.types.__string_min0_max16384.__stringMin0Max16384"
    ] = None,
    tags: Optional["capo_dataexchange.types.map_of__string.MapOf__string"] = None,
) -> "capo_dataexchange.types.create_revision_response.CreateRevisionResponse":
    """<p>This operation creates a revision for a data set.</p>

    Args:
        comment: <p>An optional comment about the revision.</p>
        data_set_id: <p>The unique identifier for a data set.</p>
        tags: <p>A revision tag is an optional label that you can assign to a revision when you create it. Each tag consists of a key and an optional value, both of which you define. When you use tagging, you can also use tag-based access control in IAM policies to control access to these data sets and revisions.</p>

    Raises:
        capo_dataexchange.errors.access_denied_exception.AccessDeniedException: <p>Access to the resource is denied.</p>
        capo_dataexchange.errors.internal_server_exception.InternalServerException: <p>An exception occurred with the service.</p>
        capo_dataexchange.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource couldn't be found.</p>
        capo_dataexchange.errors.throttling_exception.ThrottlingException: <p>The limit on the number of requests per second was exceeded.</p>
        capo_dataexchange.errors.validation_exception.ValidationException: <p>The request was invalid.</p>
        capo_dataexchange.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_dataexchange.types.create_revision_request.CreateRevisionRequest]",
    ) -> OperationResponse[
        "capo_dataexchange.types.create_revision_response.CreateRevisionResponse"
    ]:
        import capo_dataexchange._operations.data_exchange.create_revision

        output, http_response = (
            capo_dataexchange._operations.data_exchange.create_revision.create_revision(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateRevision")
    )
    input_: capo_dataexchange.types.create_revision_request.CreateRevisionRequest = {
        "data_set_id": data_set_id
    }
    if comment is not None:
        input_["comment"] = comment
    if tags is not None:
        input_["tags"] = tags

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output