Skip to content

create-microvm-auth-token action

Source: internal/service/lambdamicrovms/microvm_auth_token_action.go:12

Example usage:

imports: {
  aws-lambdamicrovms: 'github.com/cloudboss/unobin-library-aws//service/lambdamicrovms'
}

actions: {
  example: aws-lambdamicrovms.create-microvm-auth-token {
    # Set input fields here.
  }
}

Inputs

microvm-identifier

string

required

expiration-in-minutes

integer

required

allowed-ports

list(object)
list(
  object({
    all-ports: optional(boolean)
    port: optional(integer)
    range: optional(
      object({
        start-port: integer
        end-port: integer
      })
    )
  })
)

required

Input Constraints

Expiration in minutes rules

expiration-in-minutes must be between 1 and 60.

Rule logic
Require
input.expiration-in-minutes >= 1
&& input.expiration-in-minutes <= 60

Allowed ports rules

allowed-ports must not be empty.

Rule logic
Require
@core.length(input.allowed-ports) >= 1

Exactly one of allowed-ports[*].all-ports, allowed-ports[*].port, or allowed-ports[*].range.

all-ports must be true.

Rule logic
For each
input.allowed-ports
When
@each.value.all-ports != null
Require
@each.value.all-ports == true

port must be between 1 and 65535.

Rule logic
For each
input.allowed-ports
When
@each.value.port != null
Require
@each.value.port >= 1
&& @each.value.port <= 65535

range ports must be between 1 and 65535.

Rule logic
For each
input.allowed-ports
When
@each.value.range != null
Require
(@each.value.range.start-port == null || @each.value.range.start-port >= 1)
&& (@each.value.range.start-port == null || @each.value.range.start-port <= 65535)
&& (@each.value.range.end-port == null || @each.value.range.end-port >= 1)
&& (@each.value.range.end-port == null || @each.value.range.end-port <= 65535)

port range start must be no greater than end.

Rule logic
For each
input.allowed-ports
When
@each.value.range != null
Require
@each.value.range.start-port == null
|| @each.value.range.end-port == null
|| @each.value.range.start-port <= @each.value.range.end-port

Outputs

auth-token

map(string)

sensitive