mirror of
https://github.com/floci-io/floci.git
synced 2026-11-27 07:39:24 -05:00
fix(lambda): validate enum and pattern-constrained request fields (#4611)
* fix(lambda): validate enum and pattern-constrained request fields CreateFunction, UpdateFunctionConfiguration, PublishLayerVersion, the event source mapping calls, and the function URL calls now reject values outside the botocore Runtime/Architecture/FunctionResponseType/FunctionUrlAuthType/InvokeMode enums and the Role/Handler/KMSKeyArn/LayerVersionArn/Alias/Arn patterns (including AWS-managed awslayer ARNs and eusc- regions), and ListEventSourceMappings honors its EventSourceArn filter. Constraint failures use ValidationException, matching the existing pattern checks in LambdaArnUtils. * fix(lambda): validate KMSKeyArn on update, alias names, event source ARNs, and PackageType Adds KMSKeyArn pattern on UpdateFunctionConfiguration, alias name pattern and length on Create/UpdateAlias, EventSourceArn pattern on CreateEventSourceMapping, and PackageType enum on CreateFunction. * fix(lambda): accept every botocore NamespacedFunctionName in ListEventSourceMappings Add eusc- region, dotted names and $LATEST.PUBLISHED to the function name pattern. * fix(lambda): reject non-list members and validate before mutating on update UpdateFunctionUrlConfig now validates AuthType and InvokeMode before applying either, so a rejected request leaves the stored config unchanged. A non-list Layers, CompatibleRuntimes or CompatibleArchitectures is a SerializationException instead of being read as absent. Get and DeleteFunctionUrlConfig enforce the FunctionUrlQualifier constraint, UpdateFunctionConfiguration enforces the 256 character Description limit, and an empty or missing alias name is rejected.
This commit is contained in:
1 parent
0383ecf53e
commit
e6d22e8bcf
7 files changed
+763
-18
No files matched your search
@@ -315,8 +315,9 @@ public class LambdaController {
|
||||
|
||||
@GET
|
||||
@Path("/event-source-mappings")
|
||||
public Response listEventSourceMappings(@QueryParam("FunctionName") String functionArn) {
|
||||
List<EventSourceMapping> esms = lambdaService.listEventSourceMappings(functionArn);
|
||||
public Response listEventSourceMappings(@QueryParam("FunctionName") String functionArn,
|
||||
@QueryParam("EventSourceArn") String eventSourceArn) {
|
||||
List<EventSourceMapping> esms = lambdaService.listEventSourceMappings(functionArn, eventSourceArn);
|
||||
ObjectNode root = objectMapper.createObjectNode();
|
||||
ArrayNode items = root.putArray("EventSourceMappings");
|
||||
for (EventSourceMapping esm : esms) {
|
||||
|
||||
@@ -124,6 +124,10 @@ public class LambdaLayerService {
|
||||
String description = (String) request.get("Description");
|
||||
String licenseInfo = (String) request.get("LicenseInfo");
|
||||
|
||||
LambdaService.validateEnumList(request.get("CompatibleRuntimes"), "compatibleRuntimes",
|
||||
LambdaService.RUNTIME_VALUES, 15);
|
||||
LambdaService.validateEnumList(request.get("CompatibleArchitectures"), "compatibleArchitectures",
|
||||
LambdaService.ARCHITECTURE_VALUES, 2);
|
||||
List<String> compatibleRuntimes = request.get("CompatibleRuntimes") instanceof List
|
||||
? (List<String>) request.get("CompatibleRuntimes") : null;
|
||||
List<String> compatibleArchitectures = request.get("CompatibleArchitectures") instanceof List
|
||||
|
||||
@@ -82,9 +82,36 @@ public class LambdaService implements ResourceProvider {
|
||||
// The model's own Role pattern, which AWS quotes verbatim in its validation message; it
|
||||
// already accepts every partition.
|
||||
private static final Pattern ROLE_ARN_PATTERN = Pattern.compile(
|
||||
"arn:(aws[a-zA-Z-]*)?:iam::\\d{12}:role/?[a-zA-Z_0-9+=,.@\\-_/]+");
|
||||
private static final Pattern HANDLER_PATTERN = Pattern.compile("\\S+");
|
||||
"^arn:(aws[a-zA-Z-]*)?:iam::\\d{12}:role/?[a-zA-Z_0-9+=,.@\\-_/]+$");
|
||||
private static final Pattern HANDLER_PATTERN = Pattern.compile("^[^\\s]+$");
|
||||
private static final int MAX_HANDLER_LENGTH = 128;
|
||||
private static final Pattern KMS_KEY_ARN_PATTERN = Pattern.compile(
|
||||
"^(arn:(aws[a-zA-Z-]*)?:[a-z0-9-.]+:.*)?$");
|
||||
private static final Pattern LAYER_VERSION_ARN_PATTERN = Pattern.compile(
|
||||
"^((arn:(aws[a-zA-Z-]*)?:lambda:(eusc-)?[a-z]{2}((-gov)|(-iso([a-z]?)))?-[a-z]+-\\d{1}:\\d{12}:layer:[a-zA-Z0-9-_]+:[0-9]+)"
|
||||
+ "|(arn:[a-zA-Z0-9-]+:lambda:::awslayer:[a-zA-Z0-9-_]+))$");
|
||||
private static final Pattern ALIAS_NAME_PATTERN = Pattern.compile("^(?!^[0-9]+$)([a-zA-Z0-9-_]+)$");
|
||||
private static final Pattern FUNCTION_URL_QUALIFIER_PATTERN = Pattern.compile("^(?!^\\d+$)[0-9a-zA-Z-_]+$");
|
||||
private static final Pattern EVENT_SOURCE_ARN_PATTERN = Pattern.compile(
|
||||
"^arn:(aws[a-zA-Z0-9-]*):([a-zA-Z0-9-])+:((eusc-)?[a-z]{2}((-gov)|(-iso([a-z]?)))?-[a-z]+-\\d{1})?:(\\d{12})?:(.*)$");
|
||||
private static final Pattern LIST_ESM_FUNCTION_NAME_PATTERN = Pattern.compile(
|
||||
"^(arn:(aws[a-zA-Z-]*)?:lambda:)?((eusc-)?[a-z]{2}((-gov)|(-iso([a-z]?)))?-[a-z]+-\\d{1}:)?(\\d{12}:)?"
|
||||
+ "(function:)?([a-zA-Z0-9-_\\.]+)(:(\\$LATEST(\\.PUBLISHED)?|[a-zA-Z0-9-_]+))?$");
|
||||
|
||||
/** botocore lambda/2015-03-31 Runtime shape enum, kept in sync with service-2.json. */
|
||||
static final List<String> RUNTIME_VALUES = List.of(
|
||||
"nodejs", "nodejs4.3", "nodejs6.10", "nodejs8.10", "nodejs10.x", "nodejs12.x", "nodejs14.x",
|
||||
"nodejs16.x", "nodejs18.x", "nodejs20.x", "nodejs22.x", "nodejs24.x", "nodejs26.x",
|
||||
"java8", "java8.al2", "java11", "java17", "java21", "java25",
|
||||
"python2.7", "python3.6", "python3.7", "python3.8", "python3.9", "python3.10", "python3.11",
|
||||
"python3.12", "python3.13", "python3.14", "python3.15",
|
||||
"dotnetcore1.0", "dotnetcore2.0", "dotnetcore2.1", "dotnetcore3.1", "dotnet6", "dotnet8", "dotnet10",
|
||||
"nodejs4.3-edge", "go1.x", "ruby2.5", "ruby2.7", "ruby3.2", "ruby3.3", "ruby3.4", "ruby4.0",
|
||||
"provided", "provided.al2", "provided.al2023",
|
||||
"java8.al2023", "java11.al2023", "java17.al2023");
|
||||
static final List<String> ARCHITECTURE_VALUES = List.of("x86_64", "arm64");
|
||||
private static final List<String> FUNCTION_URL_AUTH_TYPE_VALUES = List.of("NONE", "AWS_IAM");
|
||||
private static final List<String> INVOKE_MODE_VALUES = List.of("BUFFERED", "RESPONSE_STREAM");
|
||||
private static final List<String> FUNCTION_ARCHITECTURES = List.of("x86_64", "arm64");
|
||||
private static final List<String> FUNCTION_RESPONSE_TYPES = List.of("ReportBatchItemFailures");
|
||||
|
||||
@@ -381,6 +408,7 @@ public class LambdaService implements ResourceProvider {
|
||||
String role = (String) request.get("Role");
|
||||
String handler = (String) request.get("Handler");
|
||||
String runtime = (String) request.get("Runtime");
|
||||
validateEnum(request.get("PackageType"), "packageType", List.of("Zip", "Image"));
|
||||
String packageType = request.getOrDefault("PackageType", "Zip").toString();
|
||||
String description = (String) request.get("Description");
|
||||
int timeout = toInt(request.get("Timeout"), config != null ? config.services().lambda().defaultTimeoutSeconds() : 3);
|
||||
@@ -396,12 +424,17 @@ public class LambdaService implements ResourceProvider {
|
||||
if (role == null || role.isBlank()) {
|
||||
throw new AwsException("InvalidParameterValueException", "Role is required", 400);
|
||||
}
|
||||
validatePattern(role, "role", ROLE_ARN_PATTERN);
|
||||
if ("Zip".equals(packageType) && (handler == null || handler.isBlank())) {
|
||||
throw new AwsException("InvalidParameterValueException", "Handler is required", 400);
|
||||
}
|
||||
validatePattern(handler, "handler", HANDLER_PATTERN);
|
||||
validateMaxLength(handler, "handler", 128);
|
||||
if ("Zip".equals(packageType) && (runtime == null || runtime.isBlank())) {
|
||||
throw new AwsException("InvalidParameterValueException", "Runtime is required for Zip package type", 400);
|
||||
}
|
||||
validateEnum(runtime, "runtime", RUNTIME_VALUES);
|
||||
validateMaxLength(description, "description", 256);
|
||||
|
||||
if (functionStore.get(region, functionName).isPresent()) {
|
||||
throw new AwsException("ResourceConflictException",
|
||||
@@ -455,16 +488,18 @@ public class LambdaService implements ResourceProvider {
|
||||
}
|
||||
|
||||
// Layers
|
||||
validateArnList(request.get("Layers"), "layers", LAYER_VERSION_ARN_PATTERN, 5);
|
||||
@SuppressWarnings("unchecked")
|
||||
List<String> layers = request.get("Layers") instanceof List
|
||||
? (List<String>) request.get("Layers") : null;
|
||||
List<String> layers = (List<String>) request.get("Layers");
|
||||
if (layers != null) {
|
||||
validateLayersResolvable(layers);
|
||||
fn.setLayers(new ArrayList<>(layers));
|
||||
}
|
||||
|
||||
if (request.containsKey("KMSKeyArn")) {
|
||||
fn.setKmsKeyArn((String) request.get("KMSKeyArn"));
|
||||
Object kmsKeyArn = request.get("KMSKeyArn");
|
||||
validatePattern(kmsKeyArn, "kmsKeyArn", KMS_KEY_ARN_PATTERN);
|
||||
fn.setKmsKeyArn((String) kmsKeyArn);
|
||||
}
|
||||
|
||||
if (vpcConfig != null) {
|
||||
@@ -740,12 +775,19 @@ public class LambdaService implements ResourceProvider {
|
||||
// same reference, not a copy), so validating this late would leave every
|
||||
// already-applied field (Description, Timeout, ...) live on a rejected update, since
|
||||
// nothing here is transactional and there's a single save() at the very end.
|
||||
if (request.containsKey("Layers")) {
|
||||
validateArnList(request.get("Layers"), "layers", LAYER_VERSION_ARN_PATTERN, 5);
|
||||
}
|
||||
@SuppressWarnings("unchecked")
|
||||
List<String> layerList = request.containsKey("Layers") && request.get("Layers") instanceof List
|
||||
? (List<String>) request.get("Layers") : null;
|
||||
List<String> layerList = (List<String>) request.get("Layers");
|
||||
if (request.containsKey("Layers")) {
|
||||
validateLayersResolvable(layerList);
|
||||
}
|
||||
validateMaxLength(request.get("Description"), "description", 256);
|
||||
if (request.containsKey("Runtime")) {
|
||||
validateEnum(request.get("Runtime"), "runtime", RUNTIME_VALUES);
|
||||
}
|
||||
validatePattern(request.get("KMSKeyArn"), "kmsKeyArn", KMS_KEY_ARN_PATTERN);
|
||||
if (request.containsKey("SnapStart")) {
|
||||
validateSnapStart(snapStart);
|
||||
}
|
||||
@@ -1207,6 +1249,7 @@ public class LambdaService implements ResourceProvider {
|
||||
if (eventSourceArn == null || eventSourceArn.isBlank()) {
|
||||
throw new AwsException("InvalidParameterValueException", "EventSourceArn is required", 400);
|
||||
}
|
||||
validatePattern(eventSourceArn, "eventSourceArn", EVENT_SOURCE_ARN_PATTERN);
|
||||
if (!eventSourceArn.contains(":sqs:") && !eventSourceArn.contains(":kinesis:")
|
||||
&& !eventSourceArn.contains(":dynamodb:")) {
|
||||
throw new AwsException("InvalidParameterValueException",
|
||||
@@ -1767,13 +1810,27 @@ public class LambdaService implements ResourceProvider {
|
||||
}
|
||||
|
||||
public List<EventSourceMapping> listEventSourceMappings(String functionArn) {
|
||||
return listEventSourceMappings(functionArn, null);
|
||||
}
|
||||
|
||||
public List<EventSourceMapping> listEventSourceMappings(String functionArn, String eventSourceArn) {
|
||||
validatePattern(functionArn, "functionName", LIST_ESM_FUNCTION_NAME_PATTERN);
|
||||
validatePattern(eventSourceArn, "eventSourceArn", EVENT_SOURCE_ARN_PATTERN);
|
||||
List<EventSourceMapping> mappings;
|
||||
if (functionArn != null && !functionArn.isBlank()) {
|
||||
// Accept bare name, partial ARN, or full ARN. The store matches
|
||||
// entries by their canonical short name, so normalize first.
|
||||
String shortName = LambdaArnUtils.resolve(functionArn).name();
|
||||
return esmStore.listByFunction(shortName);
|
||||
mappings = esmStore.listByFunction(shortName);
|
||||
} else {
|
||||
mappings = esmStore.list();
|
||||
}
|
||||
return esmStore.list();
|
||||
if (eventSourceArn != null && !eventSourceArn.isBlank()) {
|
||||
mappings = mappings.stream()
|
||||
.filter(esm -> eventSourceArn.equals(esm.getEventSourceArn()))
|
||||
.toList();
|
||||
}
|
||||
return mappings;
|
||||
}
|
||||
|
||||
public EventSourceMapping updateEventSourceMapping(String uuid, Map<String, Object> request) {
|
||||
@@ -2341,7 +2398,7 @@ public class LambdaService implements ResourceProvider {
|
||||
validateLogGroup(logging.get("LogGroup"));
|
||||
}
|
||||
|
||||
private static void validateEnum(Object value, String field, List<String> allowed) {
|
||||
static void validateEnum(Object value, String field, List<String> allowed) {
|
||||
if (value == null || allowed.contains(value)) {
|
||||
return;
|
||||
}
|
||||
@@ -2351,6 +2408,78 @@ public class LambdaService implements ResourceProvider {
|
||||
+ String.join(", ", allowed) + "]", 400);
|
||||
}
|
||||
|
||||
/**
|
||||
* A list member is either absent (null) or a JSON array; any other JSON type is a deserialization
|
||||
* failure, so it must not be mistaken for an absent member and silently clear a stored value.
|
||||
*/
|
||||
private static Object requireListOrNull(Object value, String field) {
|
||||
if (value != null && !(value instanceof List<?>)) {
|
||||
throw new AwsException("SerializationException", field + " must be a JSON array or null", 400);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
/** Validates every element of a request-supplied list against an enum, and its max size. */
|
||||
static void validateEnumList(Object value, String field, List<String> allowed, int maxItems) {
|
||||
if (!(requireListOrNull(value, field) instanceof List<?> list)) {
|
||||
return;
|
||||
}
|
||||
if (list.size() > maxItems) {
|
||||
throw new AwsException("ValidationException",
|
||||
"1 validation error detected: Value at '" + field + "' failed to satisfy constraint: "
|
||||
+ "Member must have length less than or equal to " + maxItems, 400);
|
||||
}
|
||||
for (Object item : list) {
|
||||
validateEnum(item, field + ".member", allowed);
|
||||
}
|
||||
}
|
||||
|
||||
/** Validates a request-supplied string against a botocore regex constraint, when present. */
|
||||
private static void validatePattern(Object value, String field, Pattern pattern) {
|
||||
if (!(value instanceof String s) || s.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
if (!pattern.matcher(s).matches()) {
|
||||
throw new AwsException("ValidationException",
|
||||
"1 validation error detected: Value '" + s + "' at '" + field + "' failed to satisfy "
|
||||
+ "constraint: Member must satisfy regular expression pattern: " + pattern.pattern(), 400);
|
||||
}
|
||||
}
|
||||
|
||||
/** Validates every element of a request-supplied string list against a pattern, and its max size. */
|
||||
private static void validateArnList(Object value, String field, Pattern pattern, int maxItems) {
|
||||
if (!(requireListOrNull(value, field) instanceof List<?> list)) {
|
||||
return;
|
||||
}
|
||||
if (list.size() > maxItems) {
|
||||
throw new AwsException("ValidationException",
|
||||
"1 validation error detected: Value at '" + field + "' failed to satisfy constraint: "
|
||||
+ "Member must have length less than or equal to " + maxItems, 400);
|
||||
}
|
||||
for (Object item : list) {
|
||||
validatePattern(item, field + ".member", pattern);
|
||||
}
|
||||
}
|
||||
|
||||
/** Enforces a shape's 1-character minimum: an empty string is rejected, and null too when the member is required. */
|
||||
private static void validateNonEmpty(String value, String field, boolean required) {
|
||||
if ((value == null && required) || (value != null && value.isEmpty())) {
|
||||
throw new AwsException("ValidationException",
|
||||
"1 validation error detected: Value '" + (value == null ? "" : value) + "' at '" + field
|
||||
+ "' failed to satisfy constraint: Member must have length greater than or equal to 1",
|
||||
400);
|
||||
}
|
||||
}
|
||||
|
||||
private static void validateMaxLength(Object value, String field, int maxLength) {
|
||||
if (!(value instanceof String s) || s.length() <= maxLength) {
|
||||
return;
|
||||
}
|
||||
throw new AwsException("ValidationException",
|
||||
"1 validation error detected: Value at '" + field + "' failed to satisfy constraint: "
|
||||
+ "Member must have length less than or equal to " + maxLength, 400);
|
||||
}
|
||||
|
||||
/**
|
||||
* LogGroup is the one LoggingConfig member with a documented length and character
|
||||
* constraint rather than an enum: 1-512 characters, {@code [.\-_/#A-Za-z0-9]+}.
|
||||
@@ -2471,6 +2600,7 @@ public class LambdaService implements ResourceProvider {
|
||||
public LambdaAlias createAlias(String region, String functionName, String aliasName,
|
||||
String functionVersion, String description,
|
||||
java.util.Map<String, Double> routingConfig) {
|
||||
validateAliasName(aliasName);
|
||||
LambdaFunction fn = getFunction(region, functionName);
|
||||
functionName = fn.getFunctionName();
|
||||
if (aliasStore != null && aliasStore.get(region, functionName, aliasName).isPresent()) {
|
||||
@@ -2511,6 +2641,7 @@ public class LambdaService implements ResourceProvider {
|
||||
public LambdaAlias updateAlias(String region, String functionName, String aliasName,
|
||||
String functionVersion, String description,
|
||||
java.util.Map<String, Double> routingConfig) {
|
||||
validateAliasName(aliasName);
|
||||
LambdaAlias alias = getAlias(region, functionName, aliasName);
|
||||
if (functionVersion != null) alias.setFunctionVersion(functionVersion);
|
||||
if (description != null) alias.setDescription(description);
|
||||
@@ -2521,7 +2652,21 @@ public class LambdaService implements ResourceProvider {
|
||||
return alias;
|
||||
}
|
||||
|
||||
/** FunctionUrlQualifier in botocore: 1-128 characters, not all digits. */
|
||||
private static void validateFunctionUrlQualifier(String qualifier) {
|
||||
validateNonEmpty(qualifier, "qualifier", false);
|
||||
validatePattern(qualifier, "qualifier", FUNCTION_URL_QUALIFIER_PATTERN);
|
||||
}
|
||||
|
||||
/** Alias shape in botocore: 1-128 characters matching {@link #ALIAS_NAME_PATTERN}. */
|
||||
private static void validateAliasName(String aliasName) {
|
||||
validateNonEmpty(aliasName, "name", true);
|
||||
validateMaxLength(aliasName, "name", 128);
|
||||
validatePattern(aliasName, "name", ALIAS_NAME_PATTERN);
|
||||
}
|
||||
|
||||
public void deleteAlias(String region, String functionName, String aliasName) {
|
||||
validatePattern(aliasName, "name", ALIAS_NAME_PATTERN);
|
||||
String canonical = canonicalFunctionName(region, functionName);
|
||||
getAlias(region, canonical, aliasName); // verify it exists
|
||||
if (aliasStore != null) aliasStore.delete(region, canonical, aliasName);
|
||||
@@ -2531,13 +2676,18 @@ public class LambdaService implements ResourceProvider {
|
||||
// ──────────────────────────── Function URL Config ────────────────────────────
|
||||
|
||||
public LambdaUrlConfig createFunctionUrlConfig(String region, String functionName, String qualifier, Map<String, Object> request) {
|
||||
validateFunctionUrlQualifier(qualifier);
|
||||
LambdaArnUtils.ResolvedFunctionRef ref = resolveWithRegion(region, functionName, qualifier);
|
||||
functionName = ref.name();
|
||||
qualifier = ref.qualifier();
|
||||
Object authType = request.getOrDefault("AuthType", "NONE");
|
||||
validateEnum(authType, "authType", FUNCTION_URL_AUTH_TYPE_VALUES);
|
||||
Object invokeMode = request.get("InvokeMode");
|
||||
validateEnum(invokeMode, "invokeMode", INVOKE_MODE_VALUES);
|
||||
LambdaUrlConfig urlConfig = new LambdaUrlConfig();
|
||||
urlConfig.setAuthType((String) request.getOrDefault("AuthType", "NONE"));
|
||||
if (request.containsKey("InvokeMode")) {
|
||||
urlConfig.setInvokeMode((String) request.get("InvokeMode"));
|
||||
urlConfig.setAuthType((String) authType);
|
||||
if (invokeMode != null) {
|
||||
urlConfig.setInvokeMode((String) invokeMode);
|
||||
}
|
||||
|
||||
String accountId = regionResolver.getAccountId();
|
||||
@@ -2591,6 +2741,11 @@ public class LambdaService implements ResourceProvider {
|
||||
}
|
||||
|
||||
public LambdaUrlConfig getFunctionUrlConfig(String region, String functionName, String qualifier) {
|
||||
validateFunctionUrlQualifier(qualifier);
|
||||
return lookupFunctionUrlConfig(region, functionName, qualifier);
|
||||
}
|
||||
|
||||
private LambdaUrlConfig lookupFunctionUrlConfig(String region, String functionName, String qualifier) {
|
||||
LambdaArnUtils.ResolvedFunctionRef ref = resolveWithRegion(region, functionName, qualifier);
|
||||
functionName = ref.name();
|
||||
qualifier = ref.qualifier();
|
||||
@@ -2608,16 +2763,27 @@ public class LambdaService implements ResourceProvider {
|
||||
}
|
||||
|
||||
public LambdaUrlConfig updateFunctionUrlConfig(String region, String functionName, String qualifier, Map<String, Object> request) {
|
||||
validateFunctionUrlQualifier(qualifier);
|
||||
LambdaArnUtils.ResolvedFunctionRef ref = resolveWithRegion(region, functionName, qualifier);
|
||||
functionName = ref.name();
|
||||
qualifier = ref.qualifier();
|
||||
LambdaUrlConfig urlConfig = getFunctionUrlConfig(region, functionName, qualifier);
|
||||
LambdaUrlConfig urlConfig = lookupFunctionUrlConfig(region, functionName, qualifier);
|
||||
|
||||
// urlConfig is the live object nested in the stored function or alias, so both enums are
|
||||
// validated before either is applied: a rejected request must leave the config unchanged.
|
||||
Object authType = request.get("AuthType");
|
||||
Object invokeMode = request.get("InvokeMode");
|
||||
if (request.containsKey("AuthType")) {
|
||||
urlConfig.setAuthType((String) request.get("AuthType"));
|
||||
validateEnum(authType, "authType", FUNCTION_URL_AUTH_TYPE_VALUES);
|
||||
}
|
||||
if (request.containsKey("InvokeMode")) {
|
||||
urlConfig.setInvokeMode((String) request.get("InvokeMode"));
|
||||
validateEnum(invokeMode, "invokeMode", INVOKE_MODE_VALUES);
|
||||
}
|
||||
if (request.containsKey("AuthType")) {
|
||||
urlConfig.setAuthType((String) authType);
|
||||
}
|
||||
if (request.containsKey("InvokeMode")) {
|
||||
urlConfig.setInvokeMode((String) invokeMode);
|
||||
}
|
||||
|
||||
String now = DateTimeFormatter.ISO_INSTANT.format(Instant.now().atOffset(ZoneOffset.UTC));
|
||||
@@ -2654,6 +2820,7 @@ public class LambdaService implements ResourceProvider {
|
||||
}
|
||||
|
||||
public void deleteFunctionUrlConfig(String region, String functionName, String qualifier) {
|
||||
validateFunctionUrlQualifier(qualifier);
|
||||
LambdaArnUtils.ResolvedFunctionRef ref = resolveWithRegion(region, functionName, qualifier);
|
||||
functionName = ref.name();
|
||||
qualifier = ref.qualifier();
|
||||
|
||||
Reference in new issue
Block a user