Skip to content

update_designation

update_designation(
    domain_identifier: DomainId,
    identifier: DesignationId,
    *,
    config_overrides: Optional[DataZoneClientConfig] = None,
    name: Optional[DesignationName] = None,
    description: Optional[Description] = None,
    policy: Optional[CedarDesignationPolicy] = None,
    deletion_protection: Optional[bool] = None,
) -> UpdateDesignationOutput

Updates an existing user-created designation. Managed designations cannot be modified. Omit a field to leave its current value unchanged.

Parameters:

  • domain_identifier (DomainId) –

    The identifier of the Amazon DataZone domain that contains the designation to update.

  • identifier (DesignationId) –

    The unique ID of the designation to update.

  • name (Optional[DesignationName], default: None ) –

    The updated name of the designation. The name must be unique within the domain.

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

    The updated human-readable description of the designation and its intended use.

  • policy (Optional[CedarDesignationPolicy], default: None ) –

    The updated Cedar permit policy. Omit to keep the existing policy.

  • deletion_protection (Optional[bool], default: None ) –

    Specifies whether deletion protection is enabled for this designation. Omit to keep the existing value.

Raises:

Source code in docs_src/capo_datazone/_services/data_zone.py
def update_designation(
    self,
    domain_identifier: "capo_datazone.types.domain_id.DomainId",
    identifier: "capo_datazone.types.designation_id.DesignationId",
    *,
    config_overrides: Optional[DataZoneClientConfig] = None,
    name: Optional["capo_datazone.types.designation_name.DesignationName"] = None,
    description: Optional["capo_datazone.types.description.Description"] = None,
    policy: Optional[
        "capo_datazone.types.cedar_designation_policy.CedarDesignationPolicy"
    ] = None,
    deletion_protection: Optional[bool] = None,
) -> "capo_datazone.types.update_designation_output.UpdateDesignationOutput":
    """<p>Updates an existing user-created designation. Managed designations cannot be modified. Omit a field to leave its current value unchanged.</p>

    Args:
        domain_identifier: <p>The identifier of the Amazon DataZone domain that contains the designation to update.</p>
        identifier: <p>The unique ID of the designation to update.</p>
        name: <p>The updated name of the designation. The name must be unique within the domain.</p>
        description: <p>The updated human-readable description of the designation and its intended use.</p>
        policy: <p>The updated Cedar permit policy. Omit to keep the existing policy.</p>
        deletion_protection: <p>Specifies whether deletion protection is enabled for this designation. Omit to keep the existing value.</p>

    Raises:
        capo_datazone.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_datazone.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_datazone.errors.unauthorized_exception.UnauthorizedException: <p>You do not have permission to perform this action.</p>
        capo_datazone.errors.conflict_exception.ConflictException: <p>There is a conflict while performing this action.</p>
        capo_datazone.errors.internal_server_exception.InternalServerException: <p>The request has failed because of an unknown error, exception or failure.</p>
        capo_datazone.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource cannot be found.</p>
        capo_datazone.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the Amazon Web Services service.</p>
        capo_datazone.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_datazone.types.update_designation_input.UpdateDesignationInput]",
    ) -> OperationResponse[
        "capo_datazone.types.update_designation_output.UpdateDesignationOutput"
    ]:
        import capo_datazone._operations.data_zone.update_designation

        output, http_response = (
            capo_datazone._operations.data_zone.update_designation.update_designation(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_datazone.types.update_designation_input.UpdateDesignationInput",
    ) -> dict[str, Any]:
        import capo_datazone.types.update_designation_input

        return capo_datazone.types.update_designation_input.redact_sensitive(input_)

    def _redact_output(
        output: "capo_datazone.types.update_designation_output.UpdateDesignationOutput",
    ) -> dict[str, Any]:
        import capo_datazone.types.update_designation_output

        return capo_datazone.types.update_designation_output.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "UpdateDesignation",
            redact_input=_redact_input,
            redact_output=_redact_output,
        ),
    )
    input_: capo_datazone.types.update_designation_input.UpdateDesignationInput = {
        "domain_identifier": domain_identifier,
        "identifier": identifier,
    }
    if name is not None:
        input_["name"] = name
    if description is not None:
        input_["description"] = description
    if policy is not None:
        input_["policy"] = policy
    if deletion_protection is not None:
        input_["deletion_protection"] = deletion_protection

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