putDataCatalogEncryptionSettings method

Future<void> putDataCatalogEncryptionSettings({
  1. required DataCatalogEncryptionSettings dataCatalogEncryptionSettings,
  2. String? catalogId,
})

Sets the security configuration for a specified catalog. After the configuration has been set, the specified encryption is applied to every catalog write thereafter.

May throw InternalServiceException. May throw InvalidInputException. May throw OperationTimeoutException.

Parameter dataCatalogEncryptionSettings : The security configuration to set.

Parameter catalogId : The ID of the Data Catalog to set the security configuration for. If none is provided, the AWS account ID is used by default.

Implementation

Future<void> putDataCatalogEncryptionSettings({
  required DataCatalogEncryptionSettings dataCatalogEncryptionSettings,
  String? catalogId,
}) async {
  ArgumentError.checkNotNull(
      dataCatalogEncryptionSettings, 'dataCatalogEncryptionSettings');
  _s.validateStringLength(
    'catalogId',
    catalogId,
    1,
    255,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSGlue.PutDataCatalogEncryptionSettings'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'DataCatalogEncryptionSettings': dataCatalogEncryptionSettings,
      if (catalogId != null) 'CatalogId': catalogId,
    },
  );
}