createSecurityConfiguration method

Future<CreateSecurityConfigurationResponse> createSecurityConfiguration({
  1. required EncryptionConfiguration encryptionConfiguration,
  2. required String name,
})

Creates a new security configuration. A security configuration is a set of security properties that can be used by AWS Glue. You can use a security configuration to encrypt data at rest. For information about using security configurations in AWS Glue, see Encrypting Data Written by Crawlers, Jobs, and Development Endpoints.

May throw AlreadyExistsException. May throw InvalidInputException. May throw InternalServiceException. May throw OperationTimeoutException. May throw ResourceNumberLimitExceededException.

Parameter encryptionConfiguration : The encryption configuration for the new security configuration.

Parameter name : The name for the new security configuration.

Implementation

Future<CreateSecurityConfigurationResponse> createSecurityConfiguration({
  required EncryptionConfiguration encryptionConfiguration,
  required String name,
}) async {
  ArgumentError.checkNotNull(
      encryptionConfiguration, 'encryptionConfiguration');
  ArgumentError.checkNotNull(name, 'name');
  _s.validateStringLength(
    'name',
    name,
    1,
    255,
    isRequired: true,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSGlue.CreateSecurityConfiguration'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'EncryptionConfiguration': encryptionConfiguration,
      'Name': name,
    },
  );

  return CreateSecurityConfigurationResponse.fromJson(jsonResponse.body);
}