createBrowserProfile method

Future<CreateBrowserProfileResponse> createBrowserProfile({
  1. required String name,
  2. String? clientToken,
  3. String? description,
  4. Map<String, String>? tags,
})

Creates a browser profile in Amazon Bedrock AgentCore. A browser profile stores persistent browser data such as cookies, local storage, session storage, and browsing history that can be saved from browser sessions and reused in subsequent sessions.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw ServiceQuotaExceededException. May throw ThrottlingException. May throw ValidationException.

Parameter name : The name of the browser profile. The name must be unique within your account and can contain alphanumeric characters and underscores.

Parameter clientToken : A unique, case-sensitive identifier to ensure that the operation completes no more than one time. If this token matches a previous request, Amazon Bedrock AgentCore ignores the request but does not return an error.

Parameter description : A description of the browser profile. Use this field to describe the purpose or contents of the profile.

Parameter tags : A map of tag keys and values to assign to the browser profile. Tags enable you to categorize your resources in different ways, for example, by purpose, owner, or environment.

Implementation

Future<CreateBrowserProfileResponse> createBrowserProfile({
  required String name,
  String? clientToken,
  String? description,
  Map<String, String>? tags,
}) async {
  final $payload = <String, dynamic>{
    'name': name,
    'clientToken': clientToken ?? _s.generateIdempotencyToken(),
    if (description != null) 'description': description,
    if (tags != null) 'tags': tags,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri: '/browser-profiles',
    exceptionFnMap: _exceptionFns,
  );
  return CreateBrowserProfileResponse.fromJson(response);
}