updateConfigurationBundle method
Updates a configuration bundle by creating a new version with the specified changes. Each update creates a new version in the version history.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter bundleId :
The unique identifier of the configuration bundle to update.
Parameter branchName :
The branch name for this version. If not specified, inherits the parent's
branch or defaults to mainline.
Parameter bundleName :
The updated name for the configuration bundle.
Parameter clientToken :
A unique, case-sensitive identifier to ensure that the API request
completes no more than one time. If you don't specify this field, a value
is randomly generated for you. If this token matches a previous request,
the service ignores the request, but doesn't return an error. For more
information, see Ensuring
idempotency.
Parameter commitMessage :
A commit message describing the changes in this version.
Parameter components :
The updated component configurations. Creates a new version of the bundle.
Parameter createdBy :
The source that created this version, including the source name and
optional ARN.
Parameter description :
The updated description for the configuration bundle.
Parameter parentVersionIds :
A list of parent version identifiers for lineage tracking. Regular commits
have a single parent. Merge commits have two parents: the target branch
parent and the source branch parent. If the branch already exists, the
first parent must be the latest version on that branch.
Implementation
Future<UpdateConfigurationBundleResponse> updateConfigurationBundle({
required String bundleId,
String? branchName,
String? bundleName,
String? clientToken,
String? commitMessage,
Map<String, ComponentConfiguration>? components,
VersionCreatedBySource? createdBy,
String? description,
List<String>? parentVersionIds,
}) async {
final $payload = <String, dynamic>{
if (branchName != null) 'branchName': branchName,
if (bundleName != null) 'bundleName': bundleName,
'clientToken': clientToken ?? _s.generateIdempotencyToken(),
if (commitMessage != null) 'commitMessage': commitMessage,
if (components != null) 'components': components,
if (createdBy != null) 'createdBy': createdBy,
if (description != null) 'description': description,
if (parentVersionIds != null) 'parentVersionIds': parentVersionIds,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri: '/configuration-bundles/${Uri.encodeComponent(bundleId)}',
exceptionFnMap: _exceptionFns,
);
return UpdateConfigurationBundleResponse.fromJson(response);
}