createTrustStore method

Future<CreateTrustStoreOutput> createTrustStore({
  1. required String caCertificatesBundleS3Bucket,
  2. required String caCertificatesBundleS3Key,
  3. required String name,
  4. String? caCertificatesBundleS3ObjectVersion,
  5. List<Tag>? tags,
})

Creates a trust store.

For more information, see Mutual TLS for Application Load Balancers.

May throw CaCertificatesBundleNotFoundException. May throw DuplicateTagKeysException. May throw DuplicateTrustStoreNameException. May throw InvalidCaCertificatesBundleException. May throw TooManyTagsException. May throw TooManyTrustStoresException.

Parameter caCertificatesBundleS3Bucket : The Amazon S3 bucket for the ca certificates bundle.

Parameter caCertificatesBundleS3Key : The Amazon S3 path for the ca certificates bundle.

Parameter name : The name of the trust store.

This name must be unique per region and can't be changed after creation.

Parameter caCertificatesBundleS3ObjectVersion : The Amazon S3 object version for the ca certificates bundle. If undefined the current version is used.

Parameter tags : The tags to assign to the trust store.

Implementation

Future<CreateTrustStoreOutput> createTrustStore({
  required String caCertificatesBundleS3Bucket,
  required String caCertificatesBundleS3Key,
  required String name,
  String? caCertificatesBundleS3ObjectVersion,
  List<Tag>? tags,
}) async {
  final $request = <String, String>{
    'CaCertificatesBundleS3Bucket': caCertificatesBundleS3Bucket,
    'CaCertificatesBundleS3Key': caCertificatesBundleS3Key,
    'Name': name,
    if (caCertificatesBundleS3ObjectVersion != null)
      'CaCertificatesBundleS3ObjectVersion':
          caCertificatesBundleS3ObjectVersion,
    if (tags != null)
      if (tags.isEmpty)
        'Tags': ''
      else
        for (var i1 = 0; i1 < tags.length; i1++)
          for (var e3 in tags[i1].toQueryMap().entries)
            'Tags.member.${i1 + 1}.${e3.key}': e3.value,
  };
  final $result = await _protocol.send(
    $request,
    action: 'CreateTrustStore',
    version: '2015-12-01',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    resultWrapper: 'CreateTrustStoreResult',
  );
  return CreateTrustStoreOutput.fromXml($result);
}