createAppVersionAppComponent method
Creates a new Application Component in the Resilience Hub application.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter appArn :
Amazon Resource Name (ARN) of the Resilience Hub application. The format
for this ARN is:
arn:partition:resiliencehub:region:account:app/app-id.
For more information about ARNs, see
Amazon Resource Names (ARNs) in the Amazon Web Services General
Reference guide.
Parameter name :
Name of the Application Component.
Parameter type :
Type of Application Component. For more information about the types of
Application Component, see Grouping
resources in an AppComponent.
Parameter additionalInfo :
Currently, there is no supported additional information for Application
Components.
Parameter clientToken :
Used for an idempotency token. A client token is a unique, case-sensitive
string of up to 64 ASCII characters. You should not reuse the same client
token for other API requests.
Parameter id :
Identifier of the Application Component.
Implementation
Future<CreateAppVersionAppComponentResponse> createAppVersionAppComponent({
required String appArn,
required String name,
required String type,
Map<String, List<String>>? additionalInfo,
String? clientToken,
String? id,
}) async {
final $payload = <String, dynamic>{
'appArn': appArn,
'name': name,
'type': type,
if (additionalInfo != null) 'additionalInfo': additionalInfo,
'clientToken': clientToken ?? _s.generateIdempotencyToken(),
if (id != null) 'id': id,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/create-app-version-app-component',
exceptionFnMap: _exceptionFns,
);
return CreateAppVersionAppComponentResponse.fromJson(response);
}