createBrowser method

Future<CreateBrowserResponse> createBrowser({
  1. required String name,
  2. required BrowserNetworkConfiguration networkConfiguration,
  3. BrowserSigningConfigInput? browserSigning,
  4. List<Certificate>? certificates,
  5. String? clientToken,
  6. String? description,
  7. List<BrowserEnterprisePolicy>? enterprisePolicies,
  8. String? executionRoleArn,
  9. RecordingConfig? recording,
  10. Map<String, String>? tags,
})

Creates a custom browser.

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. The name must be unique within your account.

Parameter networkConfiguration : The network configuration for the browser. This configuration specifies the network mode for the browser.

Parameter browserSigning : The browser signing configuration that enables cryptographic agent identification using HTTP message signatures for web bot authentication.

Parameter certificates : A list of certificates to install in the browser.

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 : The description of the browser.

Parameter enterprisePolicies : A list of enterprise policy files for the browser.

Parameter executionRoleArn : The Amazon Resource Name (ARN) of the IAM role that provides permissions for the browser to access Amazon Web Services services.

Parameter recording : The recording configuration for the browser. When enabled, browser sessions are recorded and stored in the specified Amazon S3 location.

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

Implementation

Future<CreateBrowserResponse> createBrowser({
  required String name,
  required BrowserNetworkConfiguration networkConfiguration,
  BrowserSigningConfigInput? browserSigning,
  List<Certificate>? certificates,
  String? clientToken,
  String? description,
  List<BrowserEnterprisePolicy>? enterprisePolicies,
  String? executionRoleArn,
  RecordingConfig? recording,
  Map<String, String>? tags,
}) async {
  final $payload = <String, dynamic>{
    'name': name,
    'networkConfiguration': networkConfiguration,
    if (browserSigning != null) 'browserSigning': browserSigning,
    if (certificates != null) 'certificates': certificates,
    'clientToken': clientToken ?? _s.generateIdempotencyToken(),
    if (description != null) 'description': description,
    if (enterprisePolicies != null) 'enterprisePolicies': enterprisePolicies,
    if (executionRoleArn != null) 'executionRoleArn': executionRoleArn,
    if (recording != null) 'recording': recording,
    if (tags != null) 'tags': tags,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri: '/browsers',
    exceptionFnMap: _exceptionFns,
  );
  return CreateBrowserResponse.fromJson(response);
}