MscmpSystInstance.Types (mscmp_syst_instance v0.1.0)

Types used by the Instance Manager module.

Summary

Types

Defines the data type of the Application Context ID.

The data type describing unique naming for known application contexts in programmatic contexts.

Attributes used in creating or updating Application Context records.

The data type of the Application ID value.

The data type describing unique naming for known system applications in programmatic contexts.

Attributes used in the creation or updating of Application records.

The data type describing the record ID value of the Instance Context record.

Defines the data type representing Instance Context names.

Attributes accepted for the creation or change of Instance Context records.

Defines the type of the Instance record ID value.

Type for identifying individual known system instances.

A map definition which allows for the maintenance of system instance records.

Establishes the available Instance state functional types understood by the module.

The type of the Instance State ID value.

Type for identifying Instance States by name.

The required data for maintaining Instance States.

The data type of the Instance Type Application record ID.

Defines the creation parameters for Instance Type Application records.

Defines the data type of the Instance Type Context ID.

The required data for maintaining Instance Type Contexts.

Expected data structure for Instance Type user_options data.

Type of the Instance Type ID value.

Type for identifying instance type names.

The required data for maintaining Instance Types.

Type for Owner record ID values.

Type for programmatic the unique identification of system owner records.

Defines a map which may be used to maintain system owner records.

Defines the available owner state functional types which the module recognizes.

Type for identifying Owner States by name.

The required data for maintaining Owner States.

Types

Link to this type

application_context_id()

@type application_context_id() :: Ecto.UUID.t()

Defines the data type of the Application Context ID.

Link to this type

application_context_name()

@type application_context_name() :: String.t()

The data type describing unique naming for known application contexts in programmatic contexts.

Link to this type

application_context_params()

@type application_context_params() :: %{
  optional(:internal_name) => application_context_name(),
  optional(:display_name) => String.t(),
  optional(:application_id) => application_id(),
  optional(:application_name) => application_name(),
  optional(:description) => String.t(),
  optional(:start_context) => boolean(),
  optional(:login_context) => boolean(),
  optional(:database_owner_context) => boolean()
}

Attributes used in creating or updating Application Context records.

Link to this type

application_id()

@type application_id() :: Ecto.UUID.t()

The data type of the Application ID value.

Link to this type

application_name()

@type application_name() :: String.t()

The data type describing unique naming for known system applications in programmatic contexts.

Link to this type

application_params()

@type application_params() :: %{
  optional(:internal_name) => application_name(),
  optional(:display_name) => String.t(),
  optional(:syst_description) => String.t()
}

Attributes used in the creation or updating of Application records.

Link to this type

instance_context_id()

@type instance_context_id() :: Ecto.UUID.t()

The data type describing the record ID value of the Instance Context record.

Link to this type

instance_context_name()

@type instance_context_name() :: String.t()

Defines the data type representing Instance Context names.

Link to this type

instance_context_params()

@type instance_context_params() :: %{
  optional(:start_context) => boolean(),
  optional(:db_pool_size) => non_neg_integer(),
  optional(:context_code) => binary()
}

Attributes accepted for the creation or change of Instance Context records.

Each Instance should have Instance Context records matched to its parent Application's Contexts, setting value specific for the Instance.

Link to this type

instance_id()

@type instance_id() :: Ecto.UUID.t()

Defines the type of the Instance record ID value.

Link to this type

instance_name()

@type instance_name() :: String.t()

Type for identifying individual known system instances.

Link to this type

instance_params()

@type instance_params() :: %{
  optional(:internal_name) => instance_name(),
  optional(:display_name) => String.t(),
  optional(:dbserver_name) => String.t(),
  optional(:application_id) => Ecto.UUID.t(),
  optional(:application_name) => application_name(),
  optional(:instance_code) => binary(),
  optional(:instance_type_id) => Ecto.UUID.t(),
  optional(:instance_type_name) => instance_type_name(),
  optional(:instance_state_id) => Ecto.UUID.t(),
  optional(:instance_state_name) => instance_state_name(),
  optional(:owner_id) => Ecto.UUID.t(),
  optional(:owner_name) => owner_name(),
  optional(:owning_instance_id) => Ecto.UUID.t(),
  optional(:owning_instance_name) => instance_name()
}

A map definition which allows for the maintenance of system instance records.

Link to this type

instance_state_functional_types()

@type instance_state_functional_types() ::
  :instance_states_uninitialized
  | :instance_states_initializing
  | :instance_states_initialized
  | :instance_states_active
  | :instance_states_migrating
  | :instance_states_suspended
  | :instance_states_inactive
  | :instance_states_failed
  | :instance_states_purge_eligible

Establishes the available Instance state functional types understood by the module.

  • :instance_states_uninitialized - The Instance definition record has been created, but the corresponding Instance has not been created on the database server and is awaiting processing.

  • :instance_states_initializing - The process of creating the Instance has been started.

  • :instance_states_initialized - The Instance Datastore has been initialized meaning the Instance Datastore has been created on the database server, but has not yet been finalized as being "active".

  • :instance_states_active - The Instance is created and usable by users.

  • :instance_states_migrating - The Instance Datastore is in the process of being updated to the latest version of the schema.

  • :instance_states_suspended - The Instance is not available for regular use, though some limited functionality may be available. The Instance is likely visible to users for this reason.

  • :instance_states_inactive - The Instance is not available for any use and would not typically be visible to users for any purpose.

  • :instance_states_failed - The Instance startup process has failed to start the Instance for some reason and requires intervention.

  • :instance_states_purge_eligible - The Instance is not available for any use, not visible to users and subject to be completely deleted from the system at any point in time.

Link to this type

instance_state_id()

@type instance_state_id() :: Ecto.UUID.t()

The type of the Instance State ID value.

Link to this type

instance_state_name()

@type instance_state_name() :: MscmpSystEnums.Types.enum_item_name()

Type for identifying Instance States by name.

Link to this type

instance_state_params()

@type instance_state_params() :: %{
  optional(:internal_name) => MscmpSystEnums.Types.enum_item_name(),
  optional(:display_name) => String.t(),
  optional(:external_name) => String.t(),
  optional(:user_description) => String.t(),
  optional(:enum_default) => boolean(),
  optional(:functional_type_name) =>
    MscmpSystEnums.Types.enum_functional_type_name()
}

The required data for maintaining Instance States.

Note that when creating new instance states, the internal_name, display_name, external_name, user_description, and functional_type_name fields are required. On updates of an existing instance state, those fields are optional.

Link to this type

instance_type_application_id()

@type instance_type_application_id() :: Ecto.UUID.t()

The data type of the Instance Type Application record ID.

Link to this type

instance_type_application_params()

@type instance_type_application_params() :: %{
  instance_type_id: instance_type_id(),
  application_id: application_id()
}

Defines the creation parameters for Instance Type Application records.

  • instance_type_id - the record ID of the parent Instance Type record. This field is required.

  • application_id - the record ID of the Application record being associated with the parent Instance Type.

Link to this type

instance_type_context_id()

@type instance_type_context_id() :: Ecto.UUID.t()

Defines the data type of the Instance Type Context ID.

Link to this type

instance_type_context_params()

@type instance_type_context_params() :: %{
  optional(:instance_type_id) => Ecto.UUID.t(),
  optional(:instance_type_name) => instance_type_name(),
  optional(:application_context_id) => Ecto.UUID.t(),
  optional(:application_context_name) => application_context_name(),
  optional(:default_db_pool_size) => non_neg_integer()
}

The required data for maintaining Instance Type Contexts.

Link to this type

instance_type_default_options()

@type instance_type_default_options() :: %{allowed_server_pools: [String.t()]}

Expected data structure for Instance Type user_options data.

Instance Type user options currently define which server pools are allowed to host Instances of the Instance Type.

Link to this type

instance_type_id()

@type instance_type_id() :: Ecto.UUID.t()

Type of the Instance Type ID value.

Link to this type

instance_type_name()

@type instance_type_name() :: MscmpSystEnums.Types.enum_item_name()

Type for identifying instance type names.

Link to this type

instance_type_params()

@type instance_type_params() :: %{
  optional(:internal_name) => MscmpSystEnums.Types.enum_item_name(),
  optional(:display_name) => String.t(),
  optional(:external_name) => String.t(),
  optional(:user_description) => String.t(),
  optional(:user_options) => instance_type_default_options(),
  optional(:enum_default) => boolean()
}

The required data for maintaining Instance Types.

Note that when creating new instance types, the internal_name, display_name, external_name, user_description, and user_options fields are required. On updates of an existing instance type, those fields are optional.

@type owner_id() :: binary()

Type for Owner record ID values.

Link to this type

owner_name()

@type owner_name() :: String.t()

Type for programmatic the unique identification of system owner records.

Link to this type

owner_params()

@type owner_params() :: %{
  optional(:internal_name) => owner_name(),
  optional(:display_name) => String.t(),
  optional(:owner_state_id) => Ecto.UUID.t()
}

Defines a map which may be used to maintain system owner records.

Link to this type

owner_state_functional_types()

@type owner_state_functional_types() ::
  :owner_states_active
  | :owner_states_suspended
  | :owner_states_inactive
  | :owner_states_purge_eligible

Defines the available owner state functional types which the module recognizes.

  • :owner_states_active - The owner is active and available for normal use.

  • :owner_states_suspended - The owner is not available for regular use, though some limited functionality may be available. The owner is likely visible to users for this reason.

  • :owner_states_inactive - The owner is not available for any use and would not typically be visible tp users for any purpose.

  • :owner_states_purge_eligible - The owner is not available for any use, not visible to users and subject to be completely deleted from the system at any point in time.

Link to this type

owner_state_name()

@type owner_state_name() :: MscmpSystEnums.Types.enum_item_name()

Type for identifying Owner States by name.

Link to this type

owner_state_params()

@type owner_state_params() :: %{
  optional(:internal_name) => MscmpSystEnums.Types.enum_item_name(),
  optional(:display_name) => String.t(),
  optional(:external_name) => String.t(),
  optional(:user_description) => String.t(),
  optional(:enum_default) => boolean(),
  optional(:functional_type_name) =>
    MscmpSystEnums.Types.enum_functional_type_name()
}

The required data for maintaining Owner States.

Note that when creating new owner states, the internal_name, display_name, external_name, user_description, and functional_type_name fields are required. On updates of an existing instance state, those fields are optional.