Skip to content

create_privacy_budget_template async

create_privacy_budget_template(
    membership_identifier: MembershipIdentifier,
    privacy_budget_type: PrivacyBudgetType,
    parameters: PrivacyBudgetTemplateParametersInput,
    *,
    config_overrides: Optional[AsyncCleanRoomsClientConfig] = None,
    auto_refresh: Optional[PrivacyBudgetTemplateAutoRefresh] = None,
    tags: Optional[TagMap] = None,
) -> CreatePrivacyBudgetTemplateOutput

Creates a privacy budget template for a specified collaboration. Each collaboration can have only one privacy budget template. If you need to change the privacy budget template, use the UpdatePrivacyBudgetTemplate operation.

Parameters:

  • membership_identifier (MembershipIdentifier) –

    A unique identifier for one of your memberships for a collaboration. The privacy budget template is created in the collaboration that this membership belongs to. Accepts a membership ID.

  • auto_refresh (Optional[PrivacyBudgetTemplateAutoRefresh], default: None ) –

    How often the privacy budget refreshes.

    If you plan to regularly bring new data into the collaboration, you can use CALENDAR_MONTH to automatically get a new privacy budget for the collaboration every calendar month. Choosing this option allows arbitrary amounts of information to be revealed about rows of the data when repeatedly queries across refreshes. Avoid choosing this if the same rows will be repeatedly queried between privacy budget refreshes.

  • privacy_budget_type (PrivacyBudgetType) –

    Specifies the type of the privacy budget template.

  • parameters (PrivacyBudgetTemplateParametersInput) –

    Specifies your parameters for the privacy budget template.

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

    An optional label that you can assign to a resource 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 this resource.

Raises:

Source code in docs_src/capo_cleanrooms/_services/async_clean_rooms.py
async def create_privacy_budget_template(
    self,
    membership_identifier: "capo_cleanrooms.types.membership_identifier.MembershipIdentifier",
    privacy_budget_type: "capo_cleanrooms.types.privacy_budget_type.PrivacyBudgetType",
    parameters: "capo_cleanrooms.types.privacy_budget_template_parameters_input.PrivacyBudgetTemplateParametersInput",
    *,
    config_overrides: Optional[AsyncCleanRoomsClientConfig] = None,
    auto_refresh: Optional[
        "capo_cleanrooms.types.privacy_budget_template_auto_refresh.PrivacyBudgetTemplateAutoRefresh"
    ] = None,
    tags: Optional["capo_cleanrooms.types.tag_map.TagMap"] = None,
) -> "capo_cleanrooms.types.create_privacy_budget_template_output.CreatePrivacyBudgetTemplateOutput":
    """<p>Creates a privacy budget template for a specified collaboration. Each collaboration can have only one privacy budget template. If you need to change the privacy budget template, use the <a>UpdatePrivacyBudgetTemplate</a> operation.</p>

    Args:
        membership_identifier: <p>A unique identifier for one of your memberships for a collaboration. The privacy budget template is created in the collaboration that this membership belongs to. Accepts a membership ID.</p>
        auto_refresh: <p>How often the privacy budget refreshes.</p> <important> <p>If you plan to regularly bring new data into the collaboration, you can use <code>CALENDAR_MONTH</code> to automatically get a new privacy budget for the collaboration every calendar month. Choosing this option allows arbitrary amounts of information to be revealed about rows of the data when repeatedly queries across refreshes. Avoid choosing this if the same rows will be repeatedly queried between privacy budget refreshes.</p> </important>
        privacy_budget_type: <p>Specifies the type of the privacy budget template.</p>
        parameters: <p>Specifies your parameters for the privacy budget template.</p>
        tags: <p>An optional label that you can assign to a resource 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 this resource.</p>

    Raises:
        capo_cleanrooms.errors.access_denied_exception.AccessDeniedException: <p>Caller does not have sufficient access to perform this action.</p>
        capo_cleanrooms.errors.conflict_exception.ConflictException: <p>Updating or deleting a resource can cause an inconsistent state.</p>
        capo_cleanrooms.errors.internal_server_exception.InternalServerException: <p>Unexpected error during processing of request.</p>
        capo_cleanrooms.errors.resource_not_found_exception.ResourceNotFoundException: <p>Request references a resource which does not exist.</p>
        capo_cleanrooms.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>Request denied because service quota has been exceeded.</p>
        capo_cleanrooms.errors.throttling_exception.ThrottlingException: <p>Request was denied due to request throttling.</p>
        capo_cleanrooms.errors.validation_exception.ValidationException: <p>The input fails to satisfy the specified constraints.</p>
        capo_cleanrooms.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_cleanrooms.types.create_privacy_budget_template_input.CreatePrivacyBudgetTemplateInput]",
    ) -> AsyncOperationResponse[
        "capo_cleanrooms.types.create_privacy_budget_template_output.CreatePrivacyBudgetTemplateOutput"
    ]:
        import capo_cleanrooms._operations.aws_bastion_control_plane_service_lambda.create_privacy_budget_template

        (
            output,
            http_response,
        ) = await capo_cleanrooms._operations.aws_bastion_control_plane_service_lambda.create_privacy_budget_template.async_create_privacy_budget_template(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreatePrivacyBudgetTemplate")
    )
    input_: capo_cleanrooms.types.create_privacy_budget_template_input.CreatePrivacyBudgetTemplateInput = {
        "membership_identifier": membership_identifier,
        "privacy_budget_type": privacy_budget_type,
        "parameters": parameters,
    }
    if auto_refresh is not None:
        input_["auto_refresh"] = auto_refresh
    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