Skip to content

update_environment_profile async

update_environment_profile(
    domain_identifier: DomainId,
    identifier: EnvironmentProfileId,
    *,
    config_overrides: Optional[AsyncDataZoneClientConfig] = None,
    name: Optional[EnvironmentProfileName] = None,
    description: Optional[str] = None,
    user_parameters: Optional[EnvironmentParametersList] = None,
    aws_account_id: Optional[AwsAccountId] = None,
    aws_account_region: Optional[AwsRegion] = None,
) -> UpdateEnvironmentProfileOutput

Updates the specified environment profile in Amazon DataZone.

Parameters:

  • domain_identifier (DomainId) –

    The identifier of the Amazon DataZone domain in which an environment profile is to be updated.

  • identifier (EnvironmentProfileId) –

    The identifier of the environment profile that is to be updated.

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

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

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

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

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

    The user parameters to be updated as part of the UpdateEnvironmentProfile action.

  • aws_account_id (Optional[AwsAccountId], default: None ) –

    The Amazon Web Services account in which a specified environment profile is to be udpated.

  • aws_account_region (Optional[AwsRegion], default: None ) –

    The Amazon Web Services Region in which a specified environment profile is to be updated.

Raises:

Source code in docs_src/capo_datazone/_services/async_data_zone.py
async def update_environment_profile(
    self,
    domain_identifier: "capo_datazone.types.domain_id.DomainId",
    identifier: "capo_datazone.types.environment_profile_id.EnvironmentProfileId",
    *,
    config_overrides: Optional[AsyncDataZoneClientConfig] = None,
    name: Optional[
        "capo_datazone.types.environment_profile_name.EnvironmentProfileName"
    ] = None,
    description: Optional[str] = None,
    user_parameters: Optional[
        "capo_datazone.types.environment_parameters_list.EnvironmentParametersList"
    ] = None,
    aws_account_id: Optional[
        "capo_datazone.types.aws_account_id.AwsAccountId"
    ] = None,
    aws_account_region: Optional["capo_datazone.types.aws_region.AwsRegion"] = None,
) -> "capo_datazone.types.update_environment_profile_output.UpdateEnvironmentProfileOutput":
    """<p>Updates the specified environment profile in Amazon DataZone.</p>

    Args:
        domain_identifier: <p>The identifier of the Amazon DataZone domain in which an environment profile is to be updated.</p>
        identifier: <p>The identifier of the environment profile that is to be updated.</p>
        name: <p>The name to be updated as part of the <code>UpdateEnvironmentProfile</code> action.</p>
        description: <p>The description to be updated as part of the <code>UpdateEnvironmentProfile</code> action.</p>
        user_parameters: <p>The user parameters to be updated as part of the <code>UpdateEnvironmentProfile</code> action.</p>
        aws_account_id: <p>The Amazon Web Services account in which a specified environment profile is to be udpated.</p>
        aws_account_region: <p>The Amazon Web Services Region in which a specified environment profile is to be updated.</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.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_profile_input.UpdateEnvironmentProfileInput]",
    ) -> AsyncOperationResponse[
        "capo_datazone.types.update_environment_profile_output.UpdateEnvironmentProfileOutput"
    ]:
        import capo_datazone._operations.data_zone.update_environment_profile

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

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

        return (
            capo_datazone.types.update_environment_profile_input.redact_sensitive(
                input_
            )
        )

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

        return (
            capo_datazone.types.update_environment_profile_output.redact_sensitive(
                output
            )
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "UpdateEnvironmentProfile",
            redact_input=_redact_input,
            redact_output=_redact_output,
        ),
    )
    input_: capo_datazone.types.update_environment_profile_input.UpdateEnvironmentProfileInput = {
        "domain_identifier": domain_identifier,
        "identifier": identifier,
    }
    if name is not None:
        input_["name"] = name
    if description is not None:
        input_["description"] = description
    if user_parameters is not None:
        input_["user_parameters"] = user_parameters
    if aws_account_id is not None:
        input_["aws_account_id"] = aws_account_id
    if aws_account_region is not None:
        input_["aws_account_region"] = aws_account_region

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