updateConfigurationProfile method

Future<ConfigurationProfile> updateConfigurationProfile({
  1. required String applicationId,
  2. required String configurationProfileId,
  3. String? description,
  4. String? kmsKeyIdentifier,
  5. String? name,
  6. String? retrievalRoleArn,
  7. List<Validator>? validators,
})

Updates a configuration profile.

May throw BadRequestException. May throw InternalServerException. May throw ResourceNotFoundException.

Parameter applicationId : The application ID.

Parameter configurationProfileId : The ID of the configuration profile.

Parameter description : A description of the configuration profile.

Parameter kmsKeyIdentifier : 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.

Parameter name : The name of the configuration profile.

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

Parameter validators : A list of methods for validating the configuration.

Implementation

Future<ConfigurationProfile> updateConfigurationProfile({
  required String applicationId,
  required String configurationProfileId,
  String? description,
  String? kmsKeyIdentifier,
  String? name,
  String? retrievalRoleArn,
  List<Validator>? validators,
}) async {
  final $payload = <String, dynamic>{
    if (description != null) 'Description': description,
    if (kmsKeyIdentifier != null) 'KmsKeyIdentifier': kmsKeyIdentifier,
    if (name != null) 'Name': name,
    if (retrievalRoleArn != null) 'RetrievalRoleArn': retrievalRoleArn,
    if (validators != null) 'Validators': validators,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PATCH',
    requestUri:
        '/applications/${Uri.encodeComponent(applicationId)}/configurationprofiles/${Uri.encodeComponent(configurationProfileId)}',
    exceptionFnMap: _exceptionFns,
  );
  return ConfigurationProfile.fromJson(response);
}