pem.addResourceType

This method is supported by Operations starting from version 2.6.3.

This method allows to add new Resource Type into system.

The method has the following input parameters:

Name

Type

Short Description

resclass_name

string

Name of the Resource Class to base new Resource Type

name

string

Name of the new Resource Type

[descr]

string

New Resource Type description

[attrs]

array of string

Attributes to attach to new Resource Type

[act_params]

array

Resource Type Activation Parameters

  • var_name

string

Name of the Activation Parameter

  • var_value

string

Activation Parameter value

The method has the following output parameters:

Name

Type

Short Description

resource_type_id

int

ID of the created Resource Type

The following APS-related resource classes and activation parameters are supported by Operations starting from version 5.5.1.

When creating a resource of the application class or service class, it is possible to specify necessary settings as additional activation parameters using the corresponding prefix before a setting name.

resclass_name = "rc.saas.service"

act_params[] = {
	"app_id", "", REQUIRED
	"service_id", "", REQUIRED
	"autoprovide_service", "0", BOOLEAN
	"priority", ""
};

It is possible to specify settings for a service as additional activation parameters using prefix s before a setting name, for example, s_name, "value".

resclass_name = "rc.saas.service.link"

act_params[] = {
	"app_id", "", REQUIRED
	"resource_uid", "", REQUIRED
	"resource_custom_name", ""
	"show_resource_total_statistics", ""
};

resclass_name = "rc.saas.resource"

"rc.saas.resource.mhz"

"rc.saas.resource.unit"

"rc.saas.resource.mbh"

"rc.saas.resource.mhzh"

"rc.saas.resource.unith"

act_params[] = {
	"app_id", "", REQUIRED
	"resource_id", "", REQUIRED
	"resource_custom_name", ""
	"show_resource_total_statistics", ""
};

resclass_name = "rc.saas.application"

act_params[] = {
	"app_id", "", REQUIRED
	"access_url_template", ""
	"addonInstallationPolicy", "-"
	"allow_auto_domain", "0", BOOLEAN
	"allow_custom_ssl_certificate", "0", BOOLEAN
	"allow_customer_domain", "0", BOOLEAN
	"application_in_cp_menu", "0", BOOLEAN
	"application_ui_in_cp_frame", "0", BOOLEAN
	"auto_bind_to_domains", "0", BOOLEAN
	"auto_host_domains", "0", BOOLEAN
	"autoprovide_application", "0", BOOLEAN
	"base_domain_id", "" 
	"custom_application_description", ""
	"custom_application_icon", ""
	"custom_application_name", ""
	"disable_instance_removal", "0", BOOLEAN
	"ip_pools", ""
	"mandatory_for_service_user", "0", BOOLEAN
	"service_user_domain_required", "0", BOOLEAN
	"ssl_protection", ""
};

For the application resource class it is possible to specify global settings and default settings as additional activation parameters.

  • Prefix g before a setting name specifies global settings for an application, for example, g_name, "value".
  • Prefix d before a setting name specifies default settings for a service of the given application, for example, d_name, "value".