Skip to content

update_environment async

update_environment(
    domain_identifier: DomainId,
    identifier: EnvironmentId,
    *,
    config_overrides: Optional[AsyncDataZoneClientConfig] = None,
    name: Optional[str] = None,
    description: Optional[str] = None,
    glossary_terms: Optional[GlossaryTerms] = None,
    blueprint_version: Optional[str] = None,
    user_parameters: Optional[EnvironmentParametersList] = None,
    environment_configuration_name: Optional[EnvironmentConfigurationName] = None,
) -> UpdateEnvironmentOutput

Updates the specified environment in Amazon DataZone.

Parameters:

  • domain_identifier (DomainId) –

    The identifier of the domain in which the environment is to be updated.

  • identifier (EnvironmentId) –

    The identifier of the environment that is to be updated.

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

    The name to be updated as part of the UpdateEnvironment action.

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

    The description to be updated as part of the UpdateEnvironment action.

  • glossary_terms (Optional[GlossaryTerms], default: None ) –

    The glossary terms to be updated as part of the UpdateEnvironment action.

  • blueprint_version (Optional[str], default: None ) –

    The blueprint version to which the environment should be updated. You can only specify the following string for this parameter: latest.

  • user_parameters (Optional[EnvironmentParametersList], default: None ) –

    The user parameters of the environment.

  • environment_configuration_name (Optional[EnvironmentConfigurationName], default: None ) –

    The configuration name of the environment.

Raises:

Source code in docs_src/capo_datazone/_services/async_data_zone.py
async def update_environment(
    self,
    domain_identifier: "capo_datazone.types.domain_id.DomainId",
    identifier: "capo_datazone.types.environment_id.EnvironmentId",
    *,
    config_overrides: Optional[AsyncDataZoneClientConfig] = None,
    name: Optional[str] = None,
    description: Optional[str] = None,
    glossary_terms: Optional[
        "capo_datazone.types.glossary_terms.GlossaryTerms"
    ] = None,
    blueprint_version: Optional[str] = None,
    user_parameters: Optional[
        "capo_datazone.types.environment_parameters_list.EnvironmentParametersList"
    ] = None,
    environment_configuration_name: Optional[
        "capo_datazone.types.environment_configuration_name.EnvironmentConfigurationName"
    ] = None,
) -> "capo_datazone.types.update_environment_output.UpdateEnvironmentOutput":
    """<p>Updates the specified environment in Amazon DataZone.</p>

    Args:
        domain_identifier: <p>The identifier of the domain in which the environment is to be updated.</p>
        identifier: <p>The identifier of the environment that is to be updated.</p>
        name: <p>The name to be updated as part of the <code>UpdateEnvironment</code> action.</p>
        description: <p>The description to be updated as part of the <code>UpdateEnvironment</code> action.</p>
        glossary_terms: <p>The glossary terms to be updated as part of the <code>UpdateEnvironment</code> action.</p>
        blueprint_version: <p>The blueprint version to which the environment should be updated. You can only specify the following string for this parameter: <code>latest</code>.</p>
        user_parameters: <p>The user parameters of the environment.</p>
        environment_configuration_name: <p>The configuration name of the environment.</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.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request has exceeded the specified service quota.</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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_datazone.types.update_environment_input.UpdateEnvironmentInput]",
    ) -> AsyncOperationResponse[
        "capo_datazone.types.update_environment_output.UpdateEnvironmentOutput"
    ]:
        import capo_datazone._operations.data_zone.update_environment

        (
            output,
            http_response,
        ) = await capo_datazone._operations.data_zone.update_environment.async_update_environment(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

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

        return capo_datazone.types.update_environment_input.redact_sensitive(input_)

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

        return capo_datazone.types.update_environment_output.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "UpdateEnvironment",
            redact_input=_redact_input,
            redact_output=_redact_output,
        ),
    )
    input_: capo_datazone.types.update_environment_input.UpdateEnvironmentInput = {
        "domain_identifier": domain_identifier,
        "identifier": identifier,
    }
    if name is not None:
        input_["name"] = name
    if description is not None:
        input_["description"] = description
    if glossary_terms is not None:
        input_["glossary_terms"] = glossary_terms
    if blueprint_version is not None:
        input_["blueprint_version"] = blueprint_version
    if user_parameters is not None:
        input_["user_parameters"] = user_parameters
    if environment_configuration_name is not None:
        input_["environment_configuration_name"] = environment_configuration_name

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