Skip to content

update_configuration_profile async

update_configuration_profile(
    application_id: Name,
    configuration_profile_id: LongName,
    *,
    config_overrides: Optional[AsyncAppConfigClientConfig] = None,
    name: Optional[LongName] = None,
    description: Optional[Description] = None,
    retrieval_role_arn: Optional[RoleArn] = None,
    validators: Optional[ValidatorList] = None,
    kms_key_identifier: Optional[KmsKeyIdentifierOrEmpty] = None,
) -> ConfigurationProfile

Updates a configuration profile.

Parameters:

  • application_id (Name) –

    The application ID.

  • configuration_profile_id (LongName) –

    The ID of the configuration profile.

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

    The name of the configuration profile.

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

    A description of the configuration profile.

  • retrieval_role_arn (Optional[RoleArn], default: None ) –

    The ARN of an IAM role with permission to access the configuration at the specified LocationUri.

    A retrieval role ARN is not required for configurations stored in CodePipeline or the AppConfig hosted configuration store. It is required for all other sources that store your configuration.

  • validators (Optional[ValidatorList], default: None ) –

    A list of methods for validating the configuration.

  • kms_key_identifier (Optional[KmsKeyIdentifierOrEmpty], default: None ) –

    The identifier for a Key Management Service key to encrypt new configuration data versions in the AppConfig hosted configuration store. This attribute is only used for hosted configuration types. The identifier can be an KMS key ID, alias, or the Amazon Resource Name (ARN) of the key ID or alias. To encrypt data managed in other configuration stores, see the documentation for how to specify an KMS key for that particular service.

Raises:

Examples:

To update a configuration profile The following update-configuration-profile example updates the description of the specified configuration profile.

>>> await client.update_configuration_profile(application_id='339ohji', configuration_profile_id='ur8hx2f', description='Configuration profile used for examples.')
Source code in docs_src/capo_appconfig/_services/async_app_config.py
async def update_configuration_profile(
    self,
    application_id: "capo_appconfig.types.name.Name",
    configuration_profile_id: "capo_appconfig.types.long_name.LongName",
    *,
    config_overrides: Optional[AsyncAppConfigClientConfig] = None,
    name: Optional["capo_appconfig.types.long_name.LongName"] = None,
    description: Optional["capo_appconfig.types.description.Description"] = None,
    retrieval_role_arn: Optional["capo_appconfig.types.role_arn.RoleArn"] = None,
    validators: Optional[
        "capo_appconfig.types.validator_list.ValidatorList"
    ] = None,
    kms_key_identifier: Optional[
        "capo_appconfig.types.kms_key_identifier_or_empty.KmsKeyIdentifierOrEmpty"
    ] = None,
) -> "capo_appconfig.types.configuration_profile.ConfigurationProfile":
    """<p>Updates a configuration profile.</p>

    Args:
        application_id: <p>The application ID.</p>
        configuration_profile_id: <p>The ID of the configuration profile.</p>
        name: <p>The name of the configuration profile.</p>
        description: <p>A description of the configuration profile.</p>
        retrieval_role_arn: <p>The ARN of an IAM role with permission to access the configuration at the specified <code>LocationUri</code>.</p> <important> <p>A retrieval role ARN is not required for configurations stored in CodePipeline or the AppConfig hosted configuration store. It is required for all other sources that store your configuration. </p> </important>
        validators: <p>A list of methods for validating the configuration.</p>
        kms_key_identifier: <p>The identifier for a Key Management Service key to encrypt new configuration data versions in the AppConfig hosted configuration store. This attribute is only used for <code>hosted</code> configuration types. The identifier can be an KMS key ID, alias, or the Amazon Resource Name (ARN) of the key ID or alias. To encrypt data managed in other configuration stores, see the documentation for how to specify an KMS key for that particular service.</p>

    Raises:
        capo_appconfig.errors.bad_request_exception.BadRequestException: <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
        capo_appconfig.errors.internal_server_exception.InternalServerException: <p>There was an internal failure in the AppConfig service.</p>
        capo_appconfig.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource could not be found.</p>
        capo_appconfig.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        To update a configuration profile
        The following update-configuration-profile example updates the description of the specified configuration profile.

        >>> await client.update_configuration_profile(application_id='339ohji', configuration_profile_id='ur8hx2f', description='Configuration profile used for examples.')
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_appconfig.types.update_configuration_profile_request.UpdateConfigurationProfileRequest]",
    ) -> AsyncOperationResponse[
        "capo_appconfig.types.configuration_profile.ConfigurationProfile"
    ]:
        import capo_appconfig._operations.amazon_app_config.update_configuration_profile

        (
            output,
            http_response,
        ) = await capo_appconfig._operations.amazon_app_config.update_configuration_profile.async_update_configuration_profile(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_appconfig.types.update_configuration_profile_request.UpdateConfigurationProfileRequest",
    ) -> dict[str, Any]:
        import capo_appconfig.types.update_configuration_profile_request

        return capo_appconfig.types.update_configuration_profile_request.redact_sensitive(
            input_
        )

    def _redact_output(
        output: "capo_appconfig.types.configuration_profile.ConfigurationProfile",
    ) -> dict[str, Any]:
        import capo_appconfig.types.configuration_profile

        return capo_appconfig.types.configuration_profile.redact_sensitive(output)

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "UpdateConfigurationProfile",
            redact_input=_redact_input,
            redact_output=_redact_output,
        ),
    )
    input_: capo_appconfig.types.update_configuration_profile_request.UpdateConfigurationProfileRequest = {
        "application_id": application_id,
        "configuration_profile_id": configuration_profile_id,
    }
    if name is not None:
        input_["name"] = name
    if description is not None:
        input_["description"] = description
    if retrieval_role_arn is not None:
        input_["retrieval_role_arn"] = retrieval_role_arn
    if validators is not None:
        input_["validators"] = validators
    if kms_key_identifier is not None:
        input_["kms_key_identifier"] = kms_key_identifier

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