putAccountSetting method

Future<PutAccountSettingResponse> putAccountSetting({
  1. required String name,
  2. required String value,
})

Allows you to change the basic scan type version or registry policy scope.

May throw InvalidParameterException. May throw LimitExceededException. May throw ServerException. May throw ValidationException.

Parameter name : The name of the account setting, such as BASIC_SCAN_TYPE_VERSION, REGISTRY_POLICY_SCOPE, or BLOB_MOUNTING.

Parameter value : Setting value that is specified. Valid value for basic scan type: AWS_NATIVE. Valid values for registry policy scope: V2. Valid values for blob mounting: ENABLED or DISABLED.

Implementation

Future<PutAccountSettingResponse> putAccountSetting({
  required String name,
  required String value,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AmazonEC2ContainerRegistry_V20150921.PutAccountSetting'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'name': name,
      'value': value,
    },
  );

  return PutAccountSettingResponse.fromJson(jsonResponse.body);
}