CreateApplicationTemplate

Updated at:

Creates an application program template. The template is at the user granularity and can be referenced by the access control policy for the Internet border, NAT, and virtual private cloud (VPC) firewalls. Before creating a template, ensure that the application program control feature is enabled and the number of templates does not exceed the quota for the instance specifications.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

yundun-cloudfirewall:CreateApplicationTemplate

create

*All Resource

*

None None

Request syntax

GET  HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

ApplicationTemplateName

string

Yes

The name of the application template. The name must be 1 to 64 characters in length and can contain Chinese characters, letters, digits, hyphens (-), underscores (_), and periods (.). It cannot contain spaces or be empty.

ApplicationTemplate01

Description

string

No

The description of the application template. The description can be up to 128 characters in length and can be empty.

Office network application control

TemplateStatus

string

Yes

The overall switch status of the application template. Valid values:

  • Enable: Enables the template.

  • Disable: Disables the template.

Enable

BuiltInApplicationStatus

string

Yes

The switch status of built-in application control. Only Enable is supported, which indicates that built-in application control is enabled. If you pass Disable, an error is returned.

Enable

CustomRuleStatus

string

Yes

The switch status of custom application rules. Valid values:

  • Enable: Enables the feature.

  • Disable: Disables the feature.

Enable

UnknownAction

string

Yes

The action to take on unidentified applications. Valid values:

  • Allow: Allows the traffic.

  • Alert: Monitors the traffic.

  • Deny: Blocks the traffic.

Alert

AddBuiltInApplicationCustomActions

array<object>

No

The list of custom actions to configure for built-in applications. The application IDs in the list must be unique.

object

No

ApplicationId

integer

No

The ID of the application for which you want to configure a custom action. The application must exist in the built-in application signature library and the ID cannot be 0. You can call the ListApplications operation to query the ID.

10012150000

Action

string

No

The action to perform on the application. Valid values:

  • Allow: Allows the traffic.

  • Alert: Monitors the traffic.

  • Deny: Blocks the traffic.

Deny

Response elements

Element

Type

Description

Example

object

The response data.

RequestId

string

The request ID.

CBF1E9B7-D6A0-4E9E-AD3E-2B47E6C2837D

ApplicationTemplateId

string

The ID of the newly created application template.

ati-4f0691c56b8d4f06

Examples

Success response

JSON format

{
  "RequestId": "CBF1E9B7-D6A0-4E9E-AD3E-2B47E6C2837D",
  "ApplicationTemplateId": "ati-4f0691c56b8d4f06"
}

Error codes

HTTP status code

Error code

Error message

Description

400 ErrorBuiltInAppStatusDisabled Parameter BuiltInApplicationActions are not Enabled. Parameter BuiltInApplicationActions is not Enabled
400 ErrorAppTemplateQuotaLimit The application template count exceed the quota. The number of application templates exceeds the specification limit
400 ErrorApplicationControlFeatureDisabled Application control feature not enabled. The application control function is not activated
400 ErrorParameterAction Parameter action error. Parameter action error
400 ErrorApplicationIdNotFound Application ID not found. Application ID does not exist
400 ErrorApplicationIdDuplicate Application ID duplicate. Duplicate Application ID
400 ErrorTemplateNameInvalid Parameter template name invalid. Template name error
400 ErrorDescriptionInvalid Parameter description invalid. Parameter description error
400 ErrorParameters Parameters error. Parameter error.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.