fbpx
PUThttps://api.spotinst.io/functions/pattern/{patternId}?accountId={spotinst-account-id}

Update a pattern

Parameter Type Description
patternId * String

The pattern ID

accountId String

The account ID

Example: act-12345
Request

Headers
{
  "Content-Type": "application/json",
  "Authorization": "Bearer ${TOKEN}"
}
Body
Copied!
Downloaded!
{
	"pattern": {
		"method": "PUT",
		"pattern": "/foo/bar/{}",
		"functionId": "fx-456",
		"functionVersion": 3
	}
}
  • pattern.method String
    The method to match the pattern. Can be:
    GET
    PUT
    POST
    DELETE
    OPTIONS
    PATCH
    ALL
    Example: POST
  • pattern.pattern String
    The pattern to match.
    Example: /foo/bar/{}/baz/*
  • pattern.functionId String
    The function ID
    Example: fx-12345
  • pattern.functionVersion Integer
    The function version
    Example: 2
Response - 200

Headers
{
  "Content-Type": "application/json"
}
Body
Copied!
Downloaded!
{
	"id": "fnap-123",
	"environmentId": "env-123",
	"method": "PUT",
	"pattern": "/foo/bar/{}",
	"functionId": "fx-123",
	"functionVersion": 3
}