Container Service
Container Type - State Machine...

Update state machine configuration of container type

1min
PUT

This API is for updating the current state-machine configuration (states, sub-states, and state transition rules) of a container type specified by the containerTypeName.

  • Events - Represents array of Events. An event contains event name, event data,if any.
    • Event Name - Represents name of the event for state transition.
    • Event data - data expected with the event and validation, if any, for the event data.
  • States List of main states with its substates and transitions.

Important: The state machine cannot be partially updated. Moreover, for each non-terminal sub-state, at least one state transition rule is expected.

PARAMETERDESCRIPTIONTYPEVALIDATION
events*Represents an array of Events. An event contains event name, event data, if any.
ㅤ↳event*Represents name of the event for state transition.stringExample: createdToOpened
ㅤ↳eventTypeSpecifies event is transitional or not. TRANSITIONAL- Transitonal event is an event that upon invocation it will change the state of the container.NON_TRANSITIONAL- Transitonal event is an event that upon invocation it will not change the state of the container.stringdefault: TRANSITIONALEnum: [ TRANSITIONAL, NON_TRANSITIONAL ]
ㅤ↳eventDataData expected with the event and validation, if any, for the event data.
ㅤㅤ↳name*Name of validation keys of an event.stringminLength: 1 maxLength: 32
ㅤㅤ↳typeEvent data typestringEnum: [string, number, boolean, object, array]
ㅤㅤ↳validationValidation rules for a string or number value.
ㅤㅤㅤ↳rangeField to specify the range that the attribute value must lie. In case of "string" data type, range will be the length of string value.
ㅤㅤㅤㅤ↳minThe min value, inclusive.number
ㅤㅤㅤㅤ↳maxThe max value, inclusive.number
ㅤㅤㅤ↳regexRegex that the data should match.stringminLength: 1 maxLength: 512
ㅤㅤㅤ↳valueOneOfEnum of accepted values.minItems: 1 maxItems: 16
ㅤㅤㅤ↳requiredSpecifies whether the value is required or optional.booleanDefault: false
ㅤㅤㅤ↳blockingSpecifies whether we need to block the event transition in case the attribute validation is failed or not.booleanDefault: true
states*List of main states with its sub-states and transitions.
created*State created.
ㅤ↳name*Name of the state.string
ㅤ↳defaultSubstate*Represents default substate for this state.string
ㅤ↳substates*minItems: 1
ㅤㅤ↳name*Name of the sub-state.stringminLength: 3 maxLength: 32
ㅤㅤ↳transitions*Represents an array of transition rules for this substate. Transition Rule for this state. Contains events and the destination state.
ㅤㅤㅤ↳event*Represents name of the event for state transition.stringminLength: 3 maxLength: 32
ㅤㅤㅤ↳destination*Name of the main state and its sub-state.stringExample: createdminLength: 3 maxLength: 32
ㅤㅤ↳ttlTime to live associated with each state of a container.
ㅤㅤㅤ↳time*Time to live is associated with the state of a container.stringpattern: Time string in days, hours, minutes, and seconds.minLength: 2Example - 30m, 1d 12h, 1d 12h 30m 45s etc.
ㅤㅤㅤ↳destination*Represents destination state to which this instance should be transitioned to after ttl expiry.string
ㅤㅤ↳callbackRepresents callback URL, which can be called to get any info about state transition of a container or its terminal ttl expiry.stringA valid URL.
opened*It signifies readiness of container to begin containerization process.
ㅤ↳name*Name of the state.string
ㅤ↳defaultSubstate*Represents default substate for this state.string
ㅤ↳substates*minItems: 1
ㅤㅤ↳name*Name of the sub-state.stringminLength: 3 maxLength: 32
ㅤㅤ↳transitions*Represents an array of transition rules for this substate. Transition Rule for this state. Contains events and the destination state.
ㅤㅤㅤ↳event*Represents name of the event for state transition.stringminLength: 3 maxLength: 32
ㅤㅤㅤ↳destination*Name of the main state and its sub-state.stringExample: createdminLength: 3 maxLength: 32
ㅤㅤ↳ttlTime to live associated with each state of a container.
ㅤㅤㅤ↳time*Time to live is associated with the state of a container.stringpattern: Time string in days, hours, minutes, and seconds.minLength: 2Example - 30m, 1d 12h, 1d 12h 30m 45s etc.
ㅤㅤㅤ↳destination*Represents destination state to which this instance should be transitioned to after ttl expiry.string
ㅤㅤ↳callbackRepresents callback URL, which can be called to get any info about state transition of a container or its terminal ttl expiry.stringA valid URL.
closed*It signifies the termination of containerization process.
ㅤ↳name*Name of the state.string
ㅤ↳defaultSubstate*Represents default substate for this state.string
ㅤ↳substates*minItems: 1
ㅤㅤ↳name*Name of the sub-state.stringminLength: 3 maxLength: 32
ㅤㅤ↳transitions*Represents an array of transition rules for this substate. Transition Rule for this state. Contains events and the destination state.
ㅤㅤㅤ↳event*Represents name of the event for state transition.stringminLength: 3 maxLength: 32
ㅤㅤㅤ↳destination*Name of the main state and its sub-state.stringExample: createdminLength: 3 maxLength: 32
ㅤㅤ↳ttlTime to live associated with each state of a container.
ㅤㅤㅤ↳time*Time to live is associated with the state of a container.stringpattern: Time string in days, hours, minutes, and seconds.minLength: 2Example - 30m, 1d 12h, 1d 12h 30m 45s etc.
ㅤㅤㅤ↳destination*Represents destination state to which this instance should be transitioned to after ttl expiry.string
ㅤㅤ↳callbackRepresents callback URL, which can be called to get any info about state transition of a container or its terminal ttl expiry.stringA valid URL.
completed*End of the lifecycle of a container.
ㅤ↳name*Name of the state.string
ㅤ↳defaultSubstate*Represents default substate for this state.string
ㅤ↳substates*minItems: 1
ㅤㅤ↳name*Name of the sub-state.stringminLength: 3 maxLength: 32
ㅤㅤ↳transitions*Represents an array of transition rules for this substate. Transition Rule for this state. Contains events and the destination state.
ㅤㅤㅤ↳event*Represents name of the event for state transition.stringminLength: 3 maxLength: 32
ㅤㅤㅤ↳destination*Name of the main state and its sub-state.stringExample: createdminLength: 3 maxLength: 32
ㅤㅤ↳ttlTime to live associated with each state of a container.
ㅤㅤㅤ↳time*Time to live is associated with the state of a container.stringpattern: Time string in days, hours, minutes, and seconds.minLength: 2Example - 30m, 1d 12h, 1d 12h 30m 45s etc.
ㅤㅤㅤ↳destination*Represents destination state to which this instance should be transitioned to after ttl expiry.string
ㅤㅤ↳callbackRepresents callback URL, which can be called to get any info about state transition of a container or its terminal ttl expiry.stringA valid URL.
terminalStatesTerminal state.sting
terminalTTL*Specifies the time to live for a data entry in the database. Specified for a tenant.stringDefault: 30d Example: 10d5h3m0s minLength: 2 maxLength: 12
callbackRepresents callback URL, which can be called to get any info about state transition of a container or its terminal ttl expiry.stringA valid URL.
*This is required.
HTTP Status Code Summary
CodeDescription
200 - OKEverything worked as expected.
400 - Bad RequestThe request was unacceptable, often due to missing a required parameter.
401 - UnauthorizedNo valid API key provided.
404 - Not FoundThe requested resource doesn't exist.
503 - Server ErrorSomething went wrong.. (These are rare.)
Path Parameters
containerTypeName
*
Header Parameters
X-COREOS-REQUEST-ID
*
X-COREOS-TID
*
X-COREOS-ACCESS
*
X-COREOS-USERINFO
Body Parameters
body
*
Description
Update container type state machine
states
*
Responses
200
OK
data
request
400
Bad Request
error
request
401
Unauthorized
error
request
404
Not Found
error
request
503
Server Error
error
request
Curl
JS
Ruby
Python
Responses
200
400
401
404
503